Skip to main content

Find contacts

GET 

/api/partner-gateway/contacts

Searches the contacts of your account, with filters, sorting and pagination.

  • Which contacts are searched: all of them, unless you send one of listIds, notListIds or sortPriorityListId. At most one of the three can be used per call.
  • Filters add up: search, gender, isValid, communicationSupported, isTest, phoneNumber, email and the consent filters are combined with AND.
  • Consent filters: emailStatus, emailTrackingStatus, smsStatus, waStatus and rcsStatus take comma-separated values among OPTIN, OPTOUT and NONE (no consent recorded). A contact matches if its consent is any of them: emailStatus=OPTIN,NONE leaves out the email opt-outs.
  • Exact lookups: phoneNumber matches the contact's mobilePhoneNumber or any of its phoneNumbers, in E.164 format with the + URL-encoded as %2B. email matches mainEmail or any of the emailAddresses, ignoring case.
  • Pagination and sorting: page is 0-based, limit goes from 1 to 1000 (default 10), sortBy defaults to fullName and sortOrder is asc or desc.
  • Not supported: filtering by id, lastContactType or lastCampaignType is refused with 400. To read one contact, use GET /contacts/{id}.

With listIds, a contact that is in several of the lists is returned once for each of them and counted as many times in totalCount. De-duplicate the results by id, or query one list at a time.

How listIds, notListIds and sortPriorityListId choose the contacts
ParameterContacts returned
None of themAll the contacts of your account.
listIdsThe contacts that belong to at least one of those lists.
notListIdsThe contacts that belong to none of those lists: useful to find the contacts not yet in a target list.
sortPriorityListIdAll your contacts, with the ones that belong to that list first.

For the contacts of one list, GET /contacts/list/{listId}/contacts is simpler.

Request​

Responses​

One page of the contacts that match the filters.