Contact Service
The Contact Service allows you to manage contacts in your workspace. You can create, read, update and delete contacts, and list or search them with filters on any field, including your own custom fields.Create Contact
Create a new contact in your workspace.Request Body
Example Request
Response
custom_fields entries were dropped during validation, the response
includes a top-level custom_field_warnings array describing each drop
(codes: unknown_key, archived_key, reserved_key, type_mismatch,
option_invalid, too_long, empty_value).
Get Contact
Retrieve a specific contact by ID.Parameters
Response
List Contacts
Use this to page through your contacts, look someone up by name or phone, or read everyone on one list. For filters on any field, use Search Contacts instead.Query Parameters
Contacts come newest first. The response has the same shape as Search Contacts below.
Search Contacts
Use this when you need a group of contacts that share something: everyone over 50 with Aetna insurance, everyone opted out, everyone added in the last 30 days who is not on a list yet. This is the same search the contacts page runs when you add filters, so an AI agent or your own code can pull exactly the people a person would see.Request Body
field is a key from List Contact Fields: one of the core fields name,
phone, email, lists, status, created_at and timezone, or the key of one of your
custom fields.
Conditions by field type
Dates are compared by calendar day in UTC.
status is opted_out when the contact’s phone or email
is on your do not contact list, and blocked when the contact is blocked. Leave value out for
empty and not_empty.
Example Request
Everyone over 50 whose insurance is Aetna, oldest first:Response
page.offset set to next_offset until
next_offset is null. total is how many contacts match across all pages.
When a request is wrong
A field that does not exist, a condition the field does not allow, or a value of the wrong kind returns400 with error_code validation_failed and a message that says what to send instead:
List Contact Fields
Use this before building a search: it lists every field a contact has, what type it is, which conditions it accepts, and its choices.Response
filled_by is agent for
fields your agent fills in after calls. To add or change custom fields, see
Custom Fields; to manage lists, see
Lists.
Update Contact
Update an existing contact.Parameters
Request Body
Example Request
Response
custom_fields entries were dropped during validation the
response includes a top-level custom_field_warnings array describing each drop.
Delete Contact
Delete a contact from your workspace.Parameters
Response
Delete Contacts
Delete up to 500 contacts at once. This can’t be undone. Each contact is deleted the same way asDELETE /contact/{id}: its details and the values in its history are removed, and its history
keeps one entry saying who deleted it and when.
Request Body
Example Request
Response
not_found lists ids with no contact in your workspace (already deleted, or never there), so
sending the same request again is safe. To delete everyone matching a search, page through
POST /contacts/search and send the ids in batches of up to 500.
A wrong request (no ids, an id that isn’t a contact id, or more than 500) returns 400 with
error_code: "validation_failed" and a message saying what to fix.