Trouble with Campaign.Create API Method / Trying to send to segement

Hello -

I am trying to use the Campaign.Create API method to create some of my campaigns. I am able to do everything but EXCLUDE "All Subscribers".

What I want to do (not working):
Run the method Campaign.Create and then ONLY Segment01 and Segment02 are added as recipients to the newly created campaign.
For the example - Let's say I have a subscriber list with 3 segments (Segment01, Segement02, and Segment03)

What is happening:
I run the method and Segment01, Segment 02, AND "All Subscribers" are included. See the debug code below*:

So is it possible to only send to specified segments (just Segment01 and Segment02, not All Subscribers which includes Segement03)? OR do you have to send to All Subscribers AND the specificed segments?

  <Campaign.Create xmlns="">
    <CampaignName>My Campaign Name</CampaignName>
    <CampaignSubject>My Campaign Subject</CampaignSubject>
    <FromName>John Smith</FromName>

* Note - this is the debug output. I'm using the php library to call the method.

Thx -

Jason Jason, 7 years ago

Hey Robby,

By the looks of things, you might be still including the ListID in the SubscriberListIDs element. To get the campaign created with only the segments, leave out this element entirely, or in the case of the PHP library, don't set this value. Only set the SegmentName/ListID combination values and pass this array through, and pass nothing or an empty array for the ListIDs.

If you're still stuck, get in touch with support via email, and we'll be happy to help further there.

fourgrant, 7 years ago

That did it. Thanks.

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