Find contacts in a contact list
GET/api/partner-gateway/contacts/list/:listId/contacts
Returns the contacts of one contact list, with the same filters, sorting and pagination as GET /contacts.
- Same as
GET /contactswithlistIdsset to this list, once the list is found in your account. Test lists are found like any other list. - Filters add up:
search,gender,isValid,communicationSupported,isTest,phoneNumber,emailand the consent filters are combined with AND. - Consent filters:
emailStatus,emailTrackingStatus,smsStatus,waStatusandrcsStatustake comma-separated values amongOPTIN,OPTOUTandNONE. WithsmsStatus=OPTIN, for example, you get the members of the list who opted in to SMS. - Pagination and sorting:
pageis 0-based,limitgoes from 1 to 1000 (default 10),sortBydefaults tofullNameandsortOrderisascordesc. - Not supported: filtering by
lastContactTypeorlastCampaignTypeis refused with400.
Use it to preview the audience of a list before a campaign, or to check which contacts a file upload imported.
Request
Responses
- 200
- 400
- 401
- 404
- 500
One page of the contacts of the list that match the filters.
A parameter is invalid: a sortOrder other than asc or desc, a page below 0, a limit outside 1-1000, a consent filter value other than OPTIN, OPTOUT or NONE, or an unsupported filter. The response body names the parameter.
The API key is missing, invalid, or lacks the CONTACTS operation.
No contact list with this ID in your account. Deleted lists answer 404 too.
Unexpected server error.