Creates or finds an existing contact for whatsapp, web-whatsapp, or webchat channels. For whatsapp/web-whatsapp, the contact is identified by phone number. For webchat, the contact is identified by external_user_id. Optionally assigns an agent, updates metadata, sets a stage, and upserts custom field values on the associated customer.
| Field | Type | Required | Description |
|---|---|---|---|
channel | string | Yes | Channel type: "whatsapp", "web-whatsapp", or "webchat" |
contact_name | string | No | Customerβs display name |
contact_email | string | No | Customerβs email address |
stageId | string | No | Pipeline stage UUID to assign the customer to |
agentId | string | No | Team member UUID to assign as responsible agent |
meta_data | object | No | Any additional customer data (AI will structure it) |
custom_field_values | array | No | Custom field values to set on the customer (see below) |
channel is "whatsapp" or "web-whatsapp":
| Field | Type | Required | Description |
|---|---|---|---|
channel_phone_number | string | Yes | Your WhatsApp channel phone number (the sender) |
contact_phone_number | string | Yes | Customerβs phone number |
channel is "webchat":
| Field | Type | Required | Description |
|---|---|---|---|
channel_id | string | Yes | UUID of your webchat channel |
external_user_id | string | Yes | Your unique identifier for the user (used to find or create the contact) |
custom_field_values array lets you set values on the associated customer using custom field definition keys. Each entry has:
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | The custom field definition key |
value | string | Yes | The value to set |
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Unique identifier for the contact |
name | string | Contactβs name |
phone | string | Contactβs phone number |
email | string | Contactβs email |
platform | string | Channel platform (whatsapp, web-whatsapp, webchat) |
client_id | string (UUID) | Your organization ID |
ai_customer_id | string (UUID) | Associated customer profile ID |
created_at | string (ISO) | Contact creation timestamp |
default_stage_id | string (UUID) | Current pipeline stage (if assigned) |
| Channel | Identified by |
|---|---|
whatsapp | contact_phone_number on the given channel |
web-whatsapp | contact_phone_number on the given channel |
webchat | external_user_id on the given channel_id |
"rut", "company_name")400 error listing any missing keystext, number, date, boolean, optionsmeta_data field uses AI to:
| Channel | Description | Required Fields |
|---|---|---|
whatsapp | WhatsApp Business API | channel_phone_number, contact_phone_number |
web-whatsapp | WhatsApp Web (QR Code) | channel_phone_number, contact_phone_number |
webchat | Webchat widget | channel_id, external_user_id |
| Status Code | Description |
|---|---|
| 400 | Bad Request - Missing required fields for the channel, or invalid custom field keys |
| 401 | Unauthorized - Invalid or missing API key |
| 500 | Internal Server Error - Something went wrong |
custom_field_values over meta_data when you have well-defined fields. Custom fields are typed, searchable, and can be marked as identifiers for deduplication.
POST /api/public/whatsapp/message/note/send endpoint:
Old:
API key needed to authorize the request
Channel type for the contact.
whatsapp, web-whatsapp, webchat Arbitrary metadata to set on the contact.
Phone number or ID of the channel. Required for whatsapp/web-whatsapp.
1UUID of the webchat channel. Required for webchat.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Stage ID to assign to the contact.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Agent ID to assign to the contact.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Phone number of the contact. Required for whatsapp/web-whatsapp.
External user identifier used to find or create the webchat contact. Required for webchat.
1Email of the contact.
Display name of the contact.
Custom field values to upsert on the customer, identified by definition key.
Contact created or found successfully.