Lewati ke konten

create_chat_link

POST
/v1/webchat/links
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" }'
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"
}

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