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);

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free