Endpoint
Authentication
Requires your publishable widget key in theAuthorization header:
Request Body
The request body is identical to the Chat endpoint. All the same fields are accepted:message, user_id, user_token, session_id, company_id, context, custom_fields, conversation_history, behavior_context, and mode.
Response
The response is a chunkedtext/plain; charset=utf-8 stream. Read it like a regular ReadableStream and append chunks as they arrive. The full text accumulates over the stream.
Action payloads (highlights, ticket creation, etc.) are interleaved in the stream as records framed by the ASCII record-separator character (\x1E):
\x1E__ACTION(S)?__...\x1E from each chunk before rendering. The widget SDK does this for you.
Response Headers
The stream response includes metadata in custom headers:
Transcripts are stored asynchronously after the stream completes.