API reference
Website chat
The public endpoints the website chat widget calls
For concepts and a walkthrough, read Website chat.
Widget appearance
/widget/{widgetKey}/configPublic. What the embedded widget needs to draw itself, from the connection settings.
- Auth
- None
Path parameters
widgetKeystringrequiredThe
externalAccountIdthe widget was connected with.
Response fields 200
titlestringrequiredgreetingstring | nullrequiredaccentColorstringrequired
WidgetConfig
titlestringrequiredgreetingstring | nullrequiredaccentColorstringrequired
Responses
- 200Title, greeting and colour.
- 401Missing, malformed, revoked or expired API key.
- 404Not found, or not visible to this organization.
- 422Request failed validation.
- 429Rate limited.
- 500Unexpected error. The correlationId ties it to our logs.
curl "https://api.getengageai.app/widget/$WIDGET_KEY/config"{
"title": "Returns policy",
"greeting": "string",
"accentColor": "string"
}A website visitor's conversation
/widget/{widgetKey}/messagesPublic, polled by widget.js. Returns only what the visitor sent and what the business actually delivered — never drafts held for review. Scoped to the visitor token, so no token can read another visitor's thread.
- Auth
- None
Path parameters
widgetKeystringrequired
Response fields 200
messagesobject[]requiredmessages[].idstring (uuid)requiredmessages[].fromenumrequiredOne of
visitor,businessmessages[].textstringrequiredmessages[].atstring (date-time)required
WidgetTranscript
messagesobject[]requiredmessages[].idstring (uuid)requiredmessages[].fromenumrequiredOne of
visitor,businessmessages[].textstringrequiredmessages[].atstring (date-time)required
Responses
- 200Oldest first.
- 401Missing, malformed, revoked or expired API key.
- 404Not found, or not visible to this organization.
- 422Request failed validation.
- 429Rate limited.
- 500Unexpected error. The correlationId ties it to our logs.
curl "https://api.getengageai.app/widget/$WIDGET_KEY/messages"{
"messages": [
{
"id": "3f6c2a1e-8b4d-4e7a-9c15-2d0b7e6f4a91",
"from": "visitor",
"text": "Yes — the Trailhead Mid GTX goes up to a UK 13, so an 11 is in the range.",
"at": "2026-10-16T09:30:00.000Z"
}
]
}Send a message from a website visitor
/widget/{widgetKey}/messagesPublic, called by widget.js. Enters the same pipeline as a WhatsApp message: stored, answered by the assistant or held for a person according to the channel's auto-reply mode, and visible in the inbox. The reply is collected by polling GET /widget/{widgetKey}/messages.
Limited to 12 messages a minute per visitor and 60 per IP. When the connection lists allowedOrigins, a request from any other site is refused with 401.
- Auth
- None
- Body
- application/json
Path parameters
widgetKeystringrequired
Request body
visitorTokenstringrequiredRandom, generated by the browser and kept in localStorage. It is the only thing that grants access to this visitor's transcript, so treat it as a secret.
Min 20 characters · Max 200 characters
clientMessageIdstringrequiredUnique per message. A retried POST with the same id is one message, not two.
Max 100 characters
textstringrequiredMax 2000 characters
namestringShown to the business. Not verified.
Max 100 characters
pageUrlstringThe page the visitor was on.
Max 500 characters
Response fields 200
statusenumrequiredOne of
accepted,duplicate,ignored
Responses
- 200Queued for a reply.
- 401Missing, malformed, revoked or expired API key.
- 404Not found, or not visible to this organization.
- 422Request failed validation.
- 429Rate limited.
- 500Unexpected error. The correlationId ties it to our logs.
curl -X POST "https://api.getengageai.app/widget/$WIDGET_KEY/messages" \
-H "Content-Type: application/json" \
-d '{
"visitorToken": "8c1f0e2d9b3a47c6a5e4d3c2b1a0f9e8",
"clientMessageId": "0b6f0f0a-3d6e-4b5e-9a3c-8d2f1e7c6b5a",
"text": "Is the Ridgeline tent still in stock?",
"pageUrl": "https://acme.example/products/ridgeline-tent"
}'{
"status": "accepted"
}