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.

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

Get started for free