Before you start
- An agent with a widget channel. A Chat & Voice Agent (conversation flow) with a Widget channel, and the Initial Parameters you want to pass.
- Its ids. In the widget channel, click Install Widget: the snippet’s
data-flow-idis the agent’s id (flowId) anddata-channel-idis the widget channel’s id (channelId). - A widget key. In Settings → API access → Widget keys, click Create. Workspace Owners and Admins can create keys. Optionally limit the key to some agents and set an expiry. The key is shown once — store it in your server’s secrets.
Base URL and authentication
Create a link
POST /v1/widget/launches
201:
url— the hosted chat. Send it to the person (email, SMS, your app).embedHtml— the embed code. Put it in the page your server renders for this person to show the conversation on your own site.token— the link’s code, returned only in this response. Keep it only as long as you need it; anyone who has it can open the conversation.
"42" for a number), a value outside a parameter’s options, or a missing required parameter is refused with invalid_parameters. Nothing is converted for you.
Look up a link
GET /v1/widget/launches/{id}
The values you sent and the token are never returned.
Revoke a link
DELETE /v1/widget/launches/{id} → 204
The link stops opening and stops resuming. Revoking again also returns 204.
Errors
Errors look like{ "error": { "code": "…", "message": "…", "details": [] } }.
