Search contacts

Searches contacts of one organization by name, phone, email or a custom field. Same matching as searchTerm on List contacts, but the parameters go in a JSON body.

Endpoint

POST
/contacts with header X-Service-Method: search

Body

NameTypeRequiredDescription
organization_idintegerYesOrganization to search in.
searchTermstringYesText to find (at least 3 characters). Without it the call returns no results.
searchInstringYesall, name, phone, email or custom_field.
custom_field_namestringWith searchIn=custom_fieldName of the custom field to search in.
system_typestringNoOnly lead, contact or conversation records.
owned_by_user_idintegerNoOnly contacts owned by this user.
$limitintegerNoPage size. Default 10.
$skipintegerNoNumber of records to skip.
$sortobjectNoOne of first_name, last_name, email, created_at, updated_at with 1 or -1. Default { "first_name": 1 }.

Request

Response

json

Each item is a full contact object; it is shortened here.

Errors

StatusWhen
400 Bad Requestorganization_id or searchIn is missing, searchIn is not a valid value, or custom_field_name is missing for searchIn=custom_field.

Report an issue with this documentation

Please log in to report issues with our documentation.