difference between listIDs and listSegments

I am working with the dotnet wrapper and more specifically getting error 134 - Invalid segments while using campaing.create method - the last two parametes of this method use listIDs and listSegments

I have configured these against the configurations we already have in the subscribers list but this error persists - trying to find examples of what these two lists refer to but not getting far

can someone describe what these two lists do and how the lists should be configured

aolivier, 5 years ago

i figured this out
+ CampaignMonitorAPIWrapper.Client.GetCampaigns
+ CampaignMonitorAPIWrapper.Client.GetLists
+ CampaignMonitorAPIWrapper.Client.GetSegments

aolivier, 5 years ago

Next question I have;
We have two subscriber lists and each does not have any segment list created
so essentially we have two lists and zero segments - the lists are simply used raw, no sub-segmentation requried on each of the lists

when using campaign.create the last two params require a list and a listSegment

the list can point to one of our lists, what about the segments - we have no segments defined as we donot need any segmentation on the full list - how do i specify this parameter with there is no segmentation list required

what is the best approach in this situation?

jamesd jamesd, 5 years ago

You can simply pass in an empty list of segment IDs. The body of the request in JSON would end up looking something like:

  "Name": "My Campaign Name",
  "Subject": "My Subject",
  "FromName": "My Name",
  "FromEmail": "myemail@mydomain.com",
  "ReplyTo": "myemail@mydomain.com",
  "HtmlUrl": "http://example.com/campaigncontent/index.html",
  "TextUrl": "http://example.com/campaigncontent/index.txt",
  "ListIDs": [
  "SegmentIDs": []

So, if you're using the .NET library you could just pass in: new List<string>() for the segmentIDs argument.

aolivier, 5 years ago

unfrtunately the listSegments argument of campaign.create only takes System.Collections.Generic.List(Of CampaignMonitorAPIWrapper.ListSegment) and not a list of strings - following your suggestion passing an empty list of segments returns a 314

this is ok, i understand better now the relationship in the API between lists and listSegments versus what the campaign monitor portal offers as subscribers and segments.

i will handle this in a different way - thank you for the feedback

jamesd jamesd, 5 years ago

You are using an old version of the .NET API wrapper. I could strongly recommend using the current version of the API by using the current .NET wrapper.

200,000 companies around the world can't be wrong.

From Australia to Zimbabwe, and everywhere in between, companies count on 
Campaign Monitor for email campaigns that drive real business results.

Get started for free