Setup
1
Create an endpoint
Any HTTPS URL that accepts a JSON POST works: your backend, a serverless
function, or an automation platform’s inbound webhook.
2
Configure the lane
In Settings → Webhooks, fill in the URL for the lane you need
(Messages Webhook URL, Leads Webhook URL, or
Escalation Webhook URL) and set a token for it. The token can be any
secret string you choose.
3
Verify the token on your side
Every delivery includes your token in the
X-WEBHOOK-TOKEN header.
Reject requests whose token does not match. This is the only
authentication on deliveries, so treat the token as a secret.Deliveries are sent once, with no automatic retries. Respond quickly with a
2xx and process the payload asynchronously on your side. If you need
guaranteed processing, make your handler idempotent and reconcile misses
through the Agent API.
Payloads
Every payload has the same envelope:{ "event": "...", "data": { ... } }.
Messages
- The lane fires for every message, so
questionandanswerare each nullable: a visitor message arrives withanswer: null, and bot, agent, and system messages can carryquestion: null. Never model both fields as required. gptModelcarries the internal model id:gpt-3.5-turbocorresponds to the GPT-4.1 Mini setting andgpt-4to GPT-4.1.- Human-agent replies include
agentId,agentName, andiconUrl. - System events in the conversation arrive as
messageType: "SYSTEM_MESSAGE"with the specific kind insystemMessageType.
Leads
customData contains your custom lead fields
keyed by field name.
Escalations
CONVERSATION_ESCALATED. If the visitor
submits their contact details afterwards, a separate
CONVERSATION_ESCALATED_UPDATED event follows with the same shape and a
populated user. Create your ticket on CONVERSATION_ESCALATED and enrich
it on the update, keyed by threadId; do not treat the second event as a
new escalation.