Custom app shopping assistant
Bootstrap from your backend
Call POST /api/v1/assistant/bootstrap with the tenant API key. Send the client surface and optional locale/customer/conversation context. The response contains branding, assistant capabilities, a short-lived bootstrap token, and Broker endpoints.
Run the client session
POST /public/v1/chat/sessionto create/resume a Broker-owned session.POST /public/v1/chat/messageswith a unique idempotency key.- Read
GET /public/v1/chat/streamusingafter_cursor, or connect to the SSE endpoint. - Persist the last cursor locally and reconnect from it.
The message acceptance response means the message was durably admitted; the answer arrives through the stream. Render transcript messages, deltas, statuses, and artifacts in cursor order. Product cards use managed media URLs and artifact-carried product destinations.
Control and failure behavior
Pre-assignment sessions may report control_mode: unassigned. Respect routing_status, ai_routing_eligible, and handoff state. Render explicit assistant failure events instead of waiting forever. Do not fabricate a reply when the stream reports a governed failure.
Security
Long-lived tenant credentials stay on your backend. The client receives only short-lived bootstrap/session material. Validate the origin/surface you requested and never reuse material across tenants.