Trigger a chat intent
Starts a new execution of the named intent. Returns the standard
execution envelope (ChatReply shape). Send an Idempotency-Key header
so a retried trigger returns the cached response (24h TTL); reusing the
key with a different payload yields 409 idempotency_conflict.
Authorizations
Deploy-wide server-to-server bearer token (ENGINE_API_TOKEN),
validated by the engine_api firewall. Authenticates the Engine API,
Knowledge base, and Conversions surfaces. The tenant_id rides in the
request body and is trusted in V1 — keep this token strictly
server-side.
Headers
Make the call safe to retry. A repeat with the same key returns the
cached response (24h TTL); reusing the key with a different payload
returns 409 idempotency_conflict.
Body
Intent to start; must match a published flow.
Attach to an existing conversation, or omit to create one.
Free-form context merged into the execution.
Optional 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
Execution envelope
The standard execution envelope returned by every Engine API call that
touches an execution — trigger and resume share one parser. Keys are
snake_case (the public Chat API uses the camelCase ChatReply shape).
waiting_input, waiting_time, completed, failed, aborted What to send to /resume next; null when the execution is terminal.
metadata.wait_token binds future /resume calls to this exact pause.
Token usage for the turn that produced these blocks, or null.