Talk to the assistant
Sends a message and streams the assistant's turn: text, tool calls and their results, and proposals for writes, which wait for approveAssistantProposal / declineAssistantProposal. A proposal left unanswered expires when the next message is sent. Counts toward the store's monthly message cap, set by the organization's plan.
The response is text/event-stream. Server-sent events, each event: <type> with a JSON data object carrying the same type: conversation {conversation_id} (always first), message_start {message_id}, text_delta {message_id, text}, thinking_delta {message_id, text}, tool_call {message_id, tool_use_id, tool_name, input}, tool_result {tool_use_id, content, is_error} (content is the tool's JSON output as a string; report tools may include chart_png_b64), proposal {message_id, proposal_id, tool_use_id, tool_name, preview, expires_at} (a write waiting for approval), message_end {message_id, stop_reason}, title {title}, usage {input_tokens, output_tokens, cache_read_tokens, cache_creation_tokens}, stopped, error {message} and done (always last).
Authorization
bearer_auth Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.
In: header
Path Parameters
Store id
uuidHeader Parameters
A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
text/event-stream
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/assistant/chat" \ -H "Content-Type: application/json" \ -d '{ "message": "string" }'"string"{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}