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
| Name | Type | Required | Description |
|---|---|---|---|
organization_id | integer | Yes | Organization to search in. |
searchTerm | string | Yes | Text to find (at least 3 characters). Without it the call returns no results. |
searchIn | string | Yes | all, name, phone, email or custom_field. |
custom_field_name | string | With searchIn=custom_field | Name of the custom field to search in. |
system_type | string | No | Only lead, contact or conversation records. |
owned_by_user_id | integer | No | Only contacts owned by this user. |
$limit | integer | No | Page size. Default 10. |
$skip | integer | No | Number of records to skip. |
$sort | object | No | One 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
| Status | When |
|---|---|
400 Bad Request | organization_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.