post
https://api.sandbox.oysterskin.com/api/v1/vendors/chatbot/stream
Stream the vendor AI assistant's response as server-sent events (SSE). The endpoint emits
metadata, incremental content chunks, and a final summary event. Use this for real-time
chat experiences; the non-streaming endpoint is available at /vendors/chatbot/ask.
Event flow: metadata → tool_progress→ display_action? → content → actions? → final_metadata → done
Event semantics:
- metadata: Includes session_id, title, persona, model, and features.
- tool_progress: Emitted when the AI invokes a tool. Includes a
titlefield
with a human-readable label (e.g. "Starting your skin scan", "Thinking"). - display_action: A client-rendered card requested by the assistant (e.g.
display_ticket_confirmation). - NOTE: there is no
productsevent. The assistant does not recommend catalogue products; a
product question is answered with guidance plus aSKIN_SCANaction. - content: A stream of assistant text chunks to render incrementally.
- actions: Emitted when the assistant triggers UI actions (e.g. SKIN_SCAN, BOOK_CONSULTATION).
Includesactionsarray of action identifiers andaction_linksarray of structured CTAs. - final_metadata: Includes the saved AI message ID and mirrors persona fields for
completeness once the response is finalized. - error: Emitted on failure, then followed by
done. When the vendor gates the chat
(Tulip orders enabled) and the customer's email is not verified, the error carries
code: "verification_required"— the client should run thePOST /widget/chat/request-code
→verify-codeflow and retry with the resultingverification_token. - done: Terminating event that signals stream completion.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…