No Campaign_id when a created the campaign

Hi,

I use the php-api to create my campaign.
Now a also want to send the campaign when a created the campaign.
To send the mail you need to have a campaignid. But the problem is when a create a campaign. I get this array without a campaignid:

CampaignMonitor Object
(
    [url]=> http://api.createsend.com/api/api.asmx
    [soapAction] => http://api.createsend.com/api/
    [api] => 11111111111111111111111111111111111
    [campaign_id] => 
    [client_id] => 
    [list_id] => 
    [method] => soap
    [curl] => 1
    [curlExists] => 1
    [debug_level] => 1
    [debug_request] => 


    
        11111111111111111111111111111111111
        11111111111111111111111111111111111
        Nieuwsbrief |  Week 46 - 47
        Nieuwsbrief |  Week 46 - 47
        Test subject
        test@test.nl
        test@test.nl
        http://www.domain.nl/sg/cronjob/mailing.php?lang_code=nl
        http://www.campaignmonitor.com/uploads/templates/previews/template-1-left-sidebar/textversion.txt
        
            11111111111111111111111111111111111
        
        
    


    [debug_response] => 11111111111111111111111111111111111
    [debug_url] => http://api.createsend.com/api/api.asmx
    [debug_info] => Array
        (
            [url]=> http://api.createsend.com/api/api.asmx
            [content_type] => text/xml; charset=utf-8
            [http_code] => 200
            [header_size] => 316
            [request_size] => 252
            [filetime] => -1
            [ssl_verify_result] => 0
            [redirect_count] => 0
            [total_time] => 2.642802
            [namelookup_time] => 0.000476
            [connect_time] => 0.111665
            [pretransfer_time] => 0.111669
            [size_upload] => 1053
            [size_download] => 437
            [speed_download] => 165
            [speed_upload] => 398
            [download_content_length] => 437
            [upload_content_length] => 1053
            [starttransfer_time] => 0.223398
            [redirect_time] => 0
            [headers_sent] => Array
                (
                    [0] => User-Agent: CMBase URL Handler 1.4.9
                    [1] => Content-Type: text/xml; charset=utf-8
                    [2] => SOAPAction: "http://api.createsend.com/api/Campaign.Create"
                )

        )

    [show_response_headers] => 0
)

How do a get the campaign_ids that are not send.

Thanks

Lex

Lexperts, 6 years ago

Nobody?

jamesd jamesd, 6 years ago

It appears that you're not making the call to create the campaign correctly.

When you create a campaign, it returns you the ID of that draft campaign. You'll need to pass that campaign ID in as an argument of your call to send the campaign.

Unfortunately, the current version of our API doesn't give you the ability to get a list of the draft campaigns (and their corresponding IDs), which I'm pleased to say we'll be introducing very soon in our new REST API.

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