Skip to content

Contacts API

The people an organization talks to, their identities and timeline.

The same operations are in the interactive API reference, and the whole contract is in the OpenAPI document.

GET/v1/contacts

List or search contacts

Returns the organization's contacts, most recently active first, a page at a time. Needs contacts:read.

With no filters it lists every active contact. q matches a name, or any part of a phone number or email address on any of the contact's identities, so a search for the last digits of a number finds its owner. tag keeps only contacts carrying that tag. The two combine: both must match.

Each item is a summary: the primary identity, the channels the person has used and their tags. Fetch the contact for the full identity list and custom fields. Contacts that were merged into another are not listed; their id still resolves on the get operation and points to the survivor.

Paged, most recently active first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total.

Free in test and live mode. Reading does not spend credit.

Scope contacts:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
qquerystringNoName, or any part of a phone number or email.
tagquerystringNoOnly contacts with this tag.
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.

POST/v1/contacts

Create a contact

Creates a contact, optionally with identities, tags and custom fields. Needs contacts:write. Free.

Identities are phone numbers and emails, normalized on the way in (a Nepal number written 98XXXXXXXX becomes +97798XXXXXXXX). An identity added here is claimed, not proven: only a call or message actually received from it makes it proven.

An identity that already belongs to another contact is not moved. The new contact is still created, the identity is left where it was, and a merge suggestion is raised and listed in suggestions_created. This is deliberate: a wrong automatic merge is hard to undo. Review the suggestions in the console, or merge the two yourself with the merge operation once you are sure.

Send Idempotency-Key. Without it, repeating the request after a timeout creates a second contact. With it, a repeat within 24 hours returns the first response and creates nothing. This does not stop two different requests, with different keys, from creating two contacts with the same name.

Returns 400 for an identity of an unknown kind or one that cannot be normalized, such as a phone number with letters in it.

Scope contacts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
Idempotency-KeyheaderstringNoMakes a POST safe to repeat: the same key returns the first result for 24 hours. The same key with a different body is refused with `422 idempotency_key_reused`; while the first request still runs, `409 idempotency_in_progress`.

GET/v1/contacts/{id}

Get a contact

Returns one contact with all its identities, tags and custom fields. Needs contacts:read. Free.

An id that was merged away still answers, with merged_into set to the surviving contact's id. Use that id from then on. An id that was erased answers as a contact with no name or identities, in the archived state, rather than 404, so links to it do not break.

Returns 404 for an id that belongs to another organization or to the other mode (test versus live).

Scope contacts:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.

PATCH/v1/contacts/{id}

Update a contact

Changes a contact. Only the fields you send change. Needs contacts:write. Free.

tags replaces the whole list; send the full set you want, not a delta. custom_fields is merged key by key, and a null value removes that key. display_name: null clears the name. do_not_contact: true stops campaigns and outbound messages from reaching this person; it does not block calls they make to you.

You cannot edit identities here. Identities become attached by being created with the contact, by arriving on a call or message, or by a merge.

PATCH is naturally repeatable: sending the same body twice leaves the same result, so no Idempotency-Key is needed.

Returns 409 when the contact was merged into another (update the survivor instead) or is archived.

Scope contacts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.

DELETE/v1/contacts/{id}

Delete a contact

Starts the erasure of a contact's personal data. Needs contacts:write. This cannot be undone, so be sure before calling it.

The erasure runs in the background across everything that holds the contact: the contact record, conversations and their files, calls and transcripts, what the assistant remembers, search indexes, and the business records the law keeps (these stay with the name replaced). It ends in a signed receipt that says what was removed and what was kept. The contact row remains as an empty tombstone so that references to it stay consistent, and it is marked do-not-contact. Asking again for the same contact is safe.

Team members (is_staff) are not erased this way; remove them from the team instead. The request is accepted and then fails for them.

Scope contacts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.

POST/v1/contacts/{id}/merge

Merge two contacts

Merges the contact named in merge_id into the contact in the path, which survives. Needs contacts:write. Free.

Identities, tags, custom fields and the whole timeline move to the survivor. The survivor keeps its own name unless keep_merged_name is true. The merged contact stays as a redirect: fetching it returns merged_into. Every merge is written to a journal with a snapshot, so staff can undo it from the console; there is no undo in the public API, and once a merged contact has been erased the undo is no longer possible.

Both contacts must be active and not already merged. Merging a contact with itself returns 400. Team members are never merged with other contacts (403).

Send Idempotency-Key. A repeat of a finished merge with a new key returns 409, because the contact is already merged, so reuse the same key when retrying.

Scope contacts:write. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
Idempotency-KeyheaderstringNoMakes a POST safe to repeat: the same key returns the first result for 24 hours. The same key with a different body is refused with `422 idempotency_key_reused`; while the first request still runs, `409 idempotency_in_progress`.

GET/v1/contacts/{id}/timeline

List a contact's calls and messages

Returns what happened with this contact, newest first: calls, messages and voicemails, a page at a time. Needs contacts:read. Free.

kinds keeps only some kinds (comma separated; at most the first 10 are read; empty entries are ignored). channel keeps one channel such as voice or whatsapp. q searches the title and text.

Entries are summaries with a pointer (ref_type, ref_id) to the full call or message. Recordings and transcripts are not in the timeline; they have their own scopes and resources.

Paged, newest first: limit is 1 to 100 (default 50, out of range values are clamped) and cursor is the next_cursor of the previous page. The cursor is opaque and never built by the client; a cursor this API did not return is a 400. has_more is true while another page exists. There is no total.

Scope contacts:read. Accepts: API key or personal access token. Open in the API reference

ParameterInTypeRequiredDescription
idpathstringYesThe resource id.
kindsquerystringNoComma separated: `call`, `message`, `voicemail`.
channelquerystringNoOnly this channel.
qquerystringNoWords in the title or text.
limitqueryintegerNoHow many items to return. Default 50, at most 100.
cursorquerystringNoThe `next_cursor` of the previous page. Opaque; never built by the client.