curl --request POST \
--url 'https://api.example.com/analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"action": "string",
"sessionId": "string",
"orgId": "string",
"agentId": "string",
"channel": "string",
"provider": "string",
"threadId": "string",
"conversationId": "string",
"pageUrl": "string",
"referrer": "string",
"data": {
"intent": "string",
"messageId": "string",
"messageType": "string",
"sender": "string",
"characterCount": 1.5,
"responseTime": 1.5,
"streamed": true,
"funnelStage": "string"
},
"timestamp": "2026-08-31T14:22:05Z",
"customFields": {}
}'
{
"ok": true
}
Receive widget analytics events
Sent when analyticsBaseUrl is set, as POST /analytics (override with analyticsEndpoint)…
POST
/
analytics
curl --request POST \
--url 'https://api.example.com/analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"action": "string",
"sessionId": "string",
"orgId": "string",
"agentId": "string",
"channel": "string",
"provider": "string",
"threadId": "string",
"conversationId": "string",
"pageUrl": "string",
"referrer": "string",
"data": {
"intent": "string",
"messageId": "string",
"messageType": "string",
"sender": "string",
"characterCount": 1.5,
"responseTime": 1.5,
"streamed": true,
"funnelStage": "string"
},
"timestamp": "2026-08-31T14:22:05Z",
"customFields": {}
}'
{
"ok": true
}
Sent when
analyticsBaseUrl is set, as POST {base}/analytics (override with analyticsEndpoint). One event per user, assistant, commerce, handoff and lifecycle action, with funnelStage on outcomes.
Request body
AnalyticsEvent
string
required
e.g.
message_sent, cart_added, checkout_redirect, handoff_request, conversation_endstring
required
string
string
string
string
string
string
string
string
object
string (date-time)
required
object
Response
Ok
boolean
required
Status codes
| Code | Meaning |
|---|---|
200 | OK |
400 | Error |
401 | Error |
curl --request POST \
--url 'https://api.example.com/analytics' \
--header 'x-widget-token: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"action": "string",
"sessionId": "string",
"orgId": "string",
"agentId": "string",
"channel": "string",
"provider": "string",
"threadId": "string",
"conversationId": "string",
"pageUrl": "string",
"referrer": "string",
"data": {
"intent": "string",
"messageId": "string",
"messageType": "string",
"sender": "string",
"characterCount": 1.5,
"responseTime": 1.5,
"streamed": true,
"funnelStage": "string"
},
"timestamp": "2026-08-31T14:22:05Z",
"customFields": {}
}'
{
"ok": true
}
Last modified on August 31, 2026