Aller au contenu

Endpoints

Contacts

Create, find, update, tag, stage and merge the people your business talks to.

Les chemins sont relatifs à l’URL de base. Chaque carte indique la permission requise par l’appel et chaque paramètre, avec son type et ses limites.

GET
/contacts

Search contacts, newest first.

Permission : contacts
Paginé

Paramètres de requête

  • qfacultatifstring

    Free-text search across name, email, phone, WhatsApp number, notes and Instagram username. Every word must match. Up to 200 characters.

  • phonefacultatifstring

    Exact phone or WhatsApp number match.

  • emailfacultatifstring

    Exact email match.

  • tagfacultatifstring

    Contacts that carry this tag (case-insensitive).

  • stage_idfacultatifinteger

    Contacts in this funnel stage.

  • assigned_to_user_idfacultatifstring

    Contacts owned by this team member.

  • channelfacultatifenum

    Contacts that came from this channel.

    Valeurs autorisées :instagramfacebooktiktokwhatsapptelegramemailwidgetapivoicesms

  • updated_sincefacultatifstring (ISO 8601 date-time with offset)

    Contacts updated at or after this time.

GET
/contacts/lookup

Find one contact by phone, email or channel username. Send at least one of phone, email or handle.

Permission : contacts

Paramètres de requête

  • phonefacultatifstring

    Phone or WhatsApp number.

  • emailfacultatifstring

    Email address.

  • handlefacultatifstring

    Channel username, with or without "@".

  • channelfacultatifenum

    Limit the handle search to one channel.

    Valeurs autorisées :instagramtiktoktelegramwhatsapp

  • Answers 404 not_found when nothing matches. When several contacts match, the oldest one is returned.
POST
/contacts

Create a contact.

Permission : contacts

Corps JSON

  • first_namefacultatifstring | null

    1–100 characters.

  • last_namefacultatifstring | null

    1–100 characters.

  • emailfacultatifstring | null

    Valid email address, up to 320 characters. Stored lowercase.

  • phonefacultatifstring | null

    3–50 characters. E.164 (+14155550123) recommended.

  • whatsapp_phonefacultatifstring | null

    WhatsApp number, 3–50 characters.

  • instagram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • tiktok_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • telegram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • country_codefacultatifstring

    Two-letter ISO 3166-1 country code, e.g. "US".

  • custom_fieldsfacultatifobject

    Custom field values keyed by custom field key (see GET /custom-fields). Merged into existing values. Unknown, archived or wrongly typed keys answer 422.

  • sourcefacultatifstring

    Where the contact came from, up to 50 characters. Default "api".

  • tagsfacultatifarray of strings

    Up to 100 tag names (1–80 characters each). Tags that do not exist yet are added to the workspace.

  • stage_idfacultatifinteger

    Funnel stage to place the contact in (see GET /funnels).

  • assigned_to_user_idfacultatifstring

    Team member who owns the contact (see GET /users).

  • Answers 201 with the contact.
POST
/contacts/upsert

Update the matching contact, or create it. Matches by phone (or whatsapp_phone), then email, then Instagram, TikTok or Telegram username.

Permission : contacts

Corps JSON

  • first_namefacultatifstring | null

    1–100 characters.

  • last_namefacultatifstring | null

    1–100 characters.

  • emailfacultatifstring | null

    Valid email address, up to 320 characters. Stored lowercase.

  • phonefacultatifstring | null

    3–50 characters. E.164 (+14155550123) recommended.

  • whatsapp_phonefacultatifstring | null

    WhatsApp number, 3–50 characters.

  • instagram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • tiktok_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • telegram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • country_codefacultatifstring

    Two-letter ISO 3166-1 country code, e.g. "US".

  • custom_fieldsfacultatifobject

    Custom field values keyed by custom field key (see GET /custom-fields). Merged into existing values. Unknown, archived or wrongly typed keys answer 422.

  • sourcefacultatifstring

    Where the contact came from, up to 50 characters. Default "api".

  • tagsfacultatifarray of strings

    Up to 100 tag names (1–80 characters each). Tags that do not exist yet are added to the workspace.

  • stage_idfacultatifinteger

    Funnel stage to place the contact in (see GET /funnels).

  • assigned_to_user_idfacultatifstring

    Team member who owns the contact (see GET /users).

  • Send at least a phone, email or channel username to match on (422 otherwise).
  • Answers { object: "contact_upsert", created, contact }: 201 when created, 200 when updated.
POST
/contacts/merge

Merge a duplicate contact into another. The secondary contact's records (conversations, bookings, orders and more) move to the primary one.

Permission : contacts

Corps JSON

  • primary_contact_idobligatoireinteger

    The contact that stays.

  • secondary_contact_idobligatoireinteger

    The duplicate that is merged away. Must differ from primary_contact_id.

GET
/contacts/:id

Retrieve a contact, including tags, stage, assignee and custom fields.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

PATCH
/contacts/:id

Update contact fields. Fields you leave out keep their value; null clears a field.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • first_namefacultatifstring | null

    1–100 characters.

  • last_namefacultatifstring | null

    1–100 characters.

  • emailfacultatifstring | null

    Valid email address, up to 320 characters. Stored lowercase.

  • phonefacultatifstring | null

    3–50 characters. E.164 (+14155550123) recommended.

  • whatsapp_phonefacultatifstring | null

    WhatsApp number, 3–50 characters.

  • instagram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • tiktok_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • telegram_usernamefacultatifstring | null

    Up to 100 characters. A leading "@" is removed.

  • country_codefacultatifstring

    Two-letter ISO 3166-1 country code, e.g. "US".

  • custom_fieldsfacultatifobject

    Custom field values keyed by custom field key (see GET /custom-fields). Merged into existing values. Unknown, archived or wrongly typed keys answer 422.

DELETE
/contacts/:id

Delete a contact and the data derived from it, the same way a delete in the app does.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

GET
/contacts/:id/channels

List the channel identities a contact can be reached on.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

POST
/contacts/:id/tags

Add tags to a contact. Tags that do not exist yet are added to the workspace.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • tagsobligatoirearray of strings

    1–100 tag names, 1–80 characters each.

DELETE
/contacts/:id/tags

Remove tags from a contact (case-insensitive). The tags stay in the workspace.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • tagsobligatoirearray of strings

    1–100 tag names.

PUT
/contacts/:id/stage

Move a contact to a funnel (lifecycle) stage.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • stage_idobligatoireinteger

    Target stage (see GET /funnels).

  • funnel_idfacultatifinteger

    Optional check: the stage must belong to this funnel.

DELETE
/contacts/:id/stage

Remove the contact from its lifecycle stage.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

PUT
/contacts/:id/assignee

Assign the contact to a team member, or unassign it.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • user_idfacultatifstring | null

    A user from GET /users. Omit or send null to unassign.

GET
/contacts/:id/notes

List the internal notes on a contact, newest first.

Permission : contacts
Paginé

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

POST
/contacts/:id/notes

Add an internal note to a contact. Customers never see notes.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • bodyobligatoirestring

    1–10,000 characters.

PUT
/contacts/:id/dnc

Turn do-not-contact on or off for a contact.

Permission : contacts

Paramètres de chemin

  • idobligatoireinteger

    Contact ID.

Corps JSON

  • do_not_contactobligatoireboolean

    true opts the contact out of messages.

  • reasonfacultatifstring

    Up to 200 characters.

GET
/funnels

List funnels with their stages, for use with stage_id.

Permission : contacts

Paramètres de requête

  • flatfacultatifstring

    "true" returns one row per stage (funnel name › stage name) instead of nested funnels.