Add contacts to mailing lists and remove them, list and count the members of a list, and follow subscriptions and unsubscriptions.
Add contacts to list
Adds existing contacts, by ID, to a mailing list. Lists that have a condition (dynamic lists) cannot be joined.
Unless noauto is set, unconfirmed contacts are confirmed when they are added. To create a contact and add it to lists in one call, use createAndJoinRecipient.
Add contacts to list › Request Body
list_idMailing list ID.
recipient_listIDs of the contacts to add.
noautoDo not confirm unconfirmed contacts automatically. Defaults to false.
reasonFree-text reason for the action.
adminAction initiated by an admin (true) or by the contact (false). Defaults to true.
truncateRemove current list members who are not in the new data. Defaults to false.
originOrigin of the action, e.g. a subscription page URL or api.
rejoinRecord a new list join even for contacts already on the list, which allows repeated welcome messages. Defaults to false.
ignore_errorsSkip contacts that cannot be added, such as missing contacts, instead of failing. Defaults to false.
Add contacts to list › Responses
OK
succeedResponse status.
resultReturns null.
Remove contact from list
Removes the contact member from the mailing list list_id. If list_id is 0, the contact is removed from all lists where it is active. Works for both static and dynamic list members.
The contact itself is not deleted. Use deleteRecipient for that.
Remove contact from list › Request Body
memberContact ID.
list_idMailing list ID.
reasonFree-text reason for the action.
Remove contact from list › Responses
OK
succeedResponse status.
resultReturns true on success.
Get list member IDs
Returns the IDs of active, confirmed list members. Unsubscribed and unconfirmed members are not included. Use getRecipientList to get contact data for the IDs, or getMailingListMembersConditional to get members with their data as CSV.
Get list member IDs › Request Body
list_idMailing list ID.
fromNumber of results to skip.
Maximum number of members to return. 0 or omitted returns all.
orderField to order results by: id, email, sms or a property name. Unordered when omitted.
sortSort direction, asc or desc. Defaults to asc.
filterCase-insensitive search text matched against email, SMS (in international format) or property values. Use * as a wildcard.
Special values:
has_emailreturns members who have an email addresshas_smsreturns members who have an SMS number
Get list member IDs › Responses
OK
succeedResponse status.
resultArray of contact IDs.
Get list members as CSV
Returns list members with their email, SMS and property values as CSV data, with a header row. Use condition to get, for example, members who bounced or unsubscribed in a time range. To get only member IDs, use getMailingListMembers.
Get list members as CSV › Request Body
list_idMailing list ID.
fromStart time as a Unix timestamp. Defaults to 0. Ignored when condition is new or omitted.
toEnd time as a Unix timestamp. Defaults to now. Ignored when condition is new or omitted.
conditionMember group to return. Omitted or other values return all members.
bouncedmembers with bouncesunsubscribedmembers who have been on the list but unsubscribedleftmembers who opted out of the listjoinedmembers who opted in to the listnewall list members
colsColumns to include: property names and optionally joined, quit, unsubscribed or member_id. Empty returns all properties.
Get list members as CSV › Responses
OK
succeedResponse status.
resultList contents in CSV format.
Get mailing list member count
Returns the number of active, confirmed members on the list. This is the same count as members in the list data.
Get mailing list member count › Request Body
listMailing list ID.
Get mailing list member count › Responses
OK
succeedResponse status.
resultList member count.
Get list-specific property values
Returns the list-specific property values of a mailing list's contacts, or of one contact if recipient_id is given.
Returns an error if list-specific properties are not enabled for your account.
Get list-specific property values › Request Body
list_idMailing list ID.
recipient_idContact ID.
Get list-specific property values › Responses
OK
succeedResponse status.
Arrays of list properties keyed by contact ID.
Get subscriptions
Returns the contacts' own subscriptions to your mailing lists: list joins that
were not made by an admin (see the admin parameter of
joinMailingList). There is one
row per contact and list, with the latest join time. Deleted and hidden lists
are skipped. With from, a date and time, only joins after that second are
returned. A from of eight characters or fewer is ignored.
Get subscriptions › Request Body
fromStart date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.
Get subscriptions › Responses
OK
succeedResponse status.
Array of subscription data.
Get unsubscriptions
Returns unsubscriptions from mailing lists since the from date, or all of them if from is omitted.
There is one row per contact and list, with the latest time the contact left the list. Rows are also added when a contact is deleted or forgotten, and are kept when the contact joins the list again. A contact who has left one list can still be active on other lists.
Get unsubscriptions › Request Body
fromStart date and time as YYYY-MM-DD HH:MM:SS. getUnsubscriptions accepts only YYYY-MM-DD.
Get unsubscriptions › Responses
OK
succeedResponse status.
Array of unsubscriptions.
Leave mailing list
Deprecated. Removes a contact from a mailing list, but works only for static members.
Use removeRecipientFromMailingList instead: it works for both dynamic and static members.
Leave mailing list › Request Body
list_idMailing list ID.
recipient_idContact ID.
Leave mailing list › Responses
OK
succeedResponse status.
resultReturns null.