Back to Documentation Overview

campaignReplicate

public static campaignReplicate(string apikey, string cid)

Replicate a campaign.

Section:
Campaign Related
Parameters:
apikey a valid API Key for your user account. Get by visiting your API dashboard
cid the Campaign Id to replicate
Returns:
string   -  the id of the replicated Campaign created, otherwise an error will be thrown

Examples (1)

download example code

[1] mcapi_campaignReplicate.php

  1. <?php
  2. /**
  3. This Example shows how to send Replicate Campaigns via the MCAPI class.
  4. **/
  5. require_once 'inc/MCAPI.class.php';
  6. require_once 'inc/config.inc.php'; //contains apikey
  7.  
  8. $api = new MCAPI($apikey);
  9.  
  10. $retval = $api->campaignReplicate($campaignId);
  11.  
  12. if ($api->errorCode){
  13. echo "Unable to Replicate Campaign!";
  14. echo "\n\tCode=".$api->errorCode;
  15. echo "\n\tMsg=".$api->errorMessage."\n";
  16. } else {
  17. echo "New Campaign Id = $retval\n";
  18. }
  19.  
Add New Note User Contributed Notes for campaignReplicate
No notes, yet... Will you be the first??