Campaign.Create

Hi,
im trying to use Campaign.Create but i always get the following error message:

Array([CCode] => 315 [Message] => ListsID's or Segments Required)

doesn anyone know how i can fix that?

thanks

pete

here is my code:

 require_once("CampaignMonitor.php");

    
    
// Example Usage
$cm = new CampaignMonitor( "XXXXX", "92182", "11111", "391257" );

// let's get some information using SOAP. we want to get all lists for a client, 
// and show active users in each. we'll also turn debugging on.

$cm->method = 'soap';
$cm->debug_level = 1;

$lists = $cm->clientGetSegments();

$lists1 = $cm->clientGetLists();
print_r($lists1);

// it might make more sense to see how an array is converted to XML to fully
// make sense of the conventions used. note that you'll need to view the source
// to see the markup.

 
   $params = array(
                "SubscriberListIDs"=>"391257",
                "Subscriber List Segments" => array("ListID"=>"391257","Name"=>"testtt"),
                "Subscriber Lists" =>  array("ListID"=>"391257","Name"=>"testtt"),
                "Campaign Name" => $_GET["Name"],
                "Campaign Subject" => $_GET["Name"] . "-subject",
                "From Name" => "API CreateCampaign testing",
                "From Email Address" => "noreply@example.com",
                "Reply To Email Address" => "noreply@example.com",
                "HTML Content URL" => "http://xxx/cm/html",
                "Text Content URL" => "http://xxx/cm/text"
        );
        $result = $cm->makeCall("Campaign.Create", $params);
    print_r($result);

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free
1-888-533-8098