Skip to main content

What is a contact?

A contact is a user that can interact with the chatbot, phone AI or email AI, a single contact might have multiple conversations across different channels.

How do I create a contact?

You can create a contact in your organization in two ways:

1. Using the API

We have a simple public API that allows you to manage contacts in your organization, you can use the API to create a contact or to authenticate a contact.

2. Using the widget

Whenever you embed the copilot widget in your application, you can use the widget options to create a contact, read more about this option in the widget documentation.

Adding custom data to a contact

You can add any custom data you want to associate with the contact. This data will be returned in the response and can be used for any purpose you want, just make sure it’s a valid JSON string object. The custom data is just a simple JSON object, you can add any key-value pairs you want to it, for example:
You can use the API or the widget to add custom data to a contact.

Reading custom data

Get a contact, list contacts and contact search return two custom data objects:
  • custom_data: data from verified sources, such as the API or an authenticated widget user.
  • non_verified_custom_data: data from unverified sources, such as an anonymous widget visitor. It is kept separate so it is never mistaken for trusted data.
These responses include only keys with text values. A key whose value is a number, boolean or nested object is left out of the response, while every other key is still returned. To read a value through the API, store it as text, for example "balance": "100".

Restricted channels

Every contact carries restricted_channels: the channels the contact asked not to be contacted on, any of email, sms, whatsapp and phone_voice. It is an empty list when nothing is restricted. Get a contact, list contacts, contact search, and the contact embedded in session and CSAT score responses all return it. Change it with Set restricted channels. See restricted channels for what a restriction stops and what still goes through.

Refused sends

A send OpenCX would start to a contact who restricted that channel, or to an address on the outbound blocklist, is refused with HTTP 422 and nothing is sent. error says why, and message names the channel:
The request itself was valid, so retrying it fails the same way until the restriction is lifted or the address is unblocked. Send emails, Send WhatsApp template and Make outbound call answer this way, and so do the MCP tools that call them.