v1

latestOpenAPI 3.0.02026-07-2612645160.3 KB
Customer

Upsert a contact

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.

post/api/public/customer/upsert/info

Headers

x-api-keystring required

API key needed to authorize the request

Request body

channel_phone_numberstring

Phone number or ID of the channel. Required for whatsapp/web-whatsapp.

channel_idstring uuid

UUID of the webchat channel. Required for webchat.

channel'whatsapp' | 'web-whatsapp' | 'webchat' required

Channel type for the contact.

stageIdstring uuid

Stage ID to assign to the contact.

agentIdstring uuid

Agent ID to assign to the contact.

contact_phone_numberstring

Phone number of the contact. Required for whatsapp/web-whatsapp.

external_user_idstring

External user identifier used to find or create the webchat contact. Required for webchat.

contact_emailstring

Email of the contact.

contact_namestring

Display name of the contact.

meta_dataobject required

Arbitrary metadata to set on the contact.

Response

Contact created or found successfully.