how to get segmentID that is created via the web?


i want to create a campaign, i use the Campaign.Create method to do so and i pass as segmentID the query string parameter (segID=5D683xxxxxxxx) that is found in the segments section when you mouse-over the list of segments. However i get the following error "
object(stdClass)#5 (2) {
  string(16) "Invalid Segments"

If i do not pass a segment (so the whole list will be the recipients) i have to problem creating a campaign.

Since the segments are quite a few and already created via the campaign monitor website how can i get the segmentsID via the php wrapper for the API?

Thank you in advance

jamesd jamesd, 6 years ago

Hey Andreas,

You can get the segments for a list, which includes the ID of the segment you should use when passing in segment IDs to create a campaign.

There is also a sample of getting segments included in the PHP API client library.

You shouldn't assume that any IDs you happen to see in the app necessarily correspond to IDs used in the API. All IDs which are asked for as input in the API are also accessible via the API.

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