Add or Remove Contacts in a List
Add contacts to a static contact list, or remove them with ?action=remove.
?action=remove. The list must be a static contact list (clt_xxx); dynamic lists (auto-populated by filter rules) and company lists are rejected.
Add vs remove
| Action | Request | Result |
|---|---|---|
| Add | POST with { "contactIds": [...] } | Contacts are added. Those already in the list are silently skipped (counted in alreadyInList). |
| Remove | POST ?action=remove with { "contactIds": [...] } | Contacts are removed. Those not in the list are silently skipped (removedCount reflects associations actually removed). |
Typical workflow
- Find or create a list — use
GET /contacts/liststo find an existing static list, orPOST /contacts/liststo create one (clt_xxx). - Find contacts — use
GET /contactswithsearch,email, orlistIdto get contact IDs (ctc_xxx). - Add or remove — call this endpoint with the contact IDs and list ID. Up to 1,000 contacts per request.
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Path Parameters
The unique identifier of the contact list (clt_xxx format). Must be a static contact list.
^clt_[a-zA-Z0-9]+$Query Parameters
Omit to add the contacts to the list. Set to remove to remove them from the list.
remove Body
Array of contact IDs (ctc_xxx format) to add to or remove from the list. Required, non-empty, maximum 1,000 per request.
1 - 1000 elements^ctc_[a-zA-Z0-9]+$Response
Contacts added to or removed from the list successfully. The response body depends on action.
Number of contacts added to the list (add only).
Number of contacts that were already in the list and therefore skipped (add only).
Number of list associations actually removed (remove only). Contacts that were not in the list are not counted.