Open a chat session
Validates the widget key + Origin, ensures a Conversation for the
customer, and returns a signed sessionToken along with the list of
intents the widget is permitted to trigger. Call this once per
visitor session.
Body
^pk_live_[a-f0-9]{32}$"pk_live_1a2b3c4d5e6f7890abcd1234ef567890"
Your stable user identifier. Used for cross-session history joins and analytics.
100BCP-47 locale forwarded to the flow as conversation context.
16Optional conversation variables merged into the conversation row and
surfaced to the flow as untrusted input. Constraints (rejected with a
422 validation_failed on the chat surface, 422 invalid_input on the
Engine API):
- at most 50 keys;
- at most 4096 bytes total when JSON-encoded;
- keys are snake_case matching
^[a-z][a-z0-9_]{0,63}$; - values are scalar, null, or arrays nested at most 4 levels deep (plain objects/maps as values are rejected).
{
"cart_total": 129,
"page_path": "/pricing",
"tags": ["returning", "vip"]
}Response
Session opened
HMAC-signed bearer token. Pass as Authorization: Bearer <token> on subsequent calls.
Intents this widget may trigger, intersected with the tenant's currently-published flows. Empty when the widget key has an explicit allow-list that doesn't intersect any published intent — the chat is effectively unavailable until either the key's list is widened or matching flows are published.
Tenant-configured quick-question prompts. Each prompt carries its
display text, the page context it should surface on, and — when its
assigned flow is published and this widget key is permitted to
trigger it — the intentName the widget posts to start it. A prompt
whose flow is unset, unpublished, or not permitted comes back with a
null intentName so the client can still render it (disabled).
Page filtering is left to the client.