create_chat_link
POST
/v1/webchat/links
const url = 'https://example.com/v1/webchat/links';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"contact_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","phone":"example","ttl_hours":1,"widget_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/webchat/links \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "phone": "example", "ttl_hours": 1, "widget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ” Media type application/json
object
contact_id
string | null format: uuid
phone
string | null
ttl_hours
integer | null format: int64
widget_id
string | null format: uuid
Example generated
{ "contact_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "phone": "example", "ttl_hours": 1, "widget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “ Responses ”One-time chat link created for the contact
Media type application/json
object
expires_at
required
string format: date-time
id
required
string format: uuid
token
required
string
url
required
string
widget_id
required
string format: uuid
Example generated
{ "expires_at": "2026-04-15T12:00:00Z", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "token": "example", "url": "example", "widget_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Validation error (missing/both contact_id and phone, or no PWA widget enabled)
Unauthorized
Contact or widget not found for this tenant