Skip to navigation

Send a chat message

View as Markdown

Sends a user message to the agent. attachments contains ready Files API keys owned by the caller; file bytes are never inlined. The sidecar reloads authoritative metadata, persists the user turn, then forwards it to the agent. The assistant reply streams over the SSE endpoint and is persisted as it arrives. Subscribe to the stream endpoint for live chunks. A conversation owned by another user returns 404.

Set edit_of to replace one of the user’s earlier messages on a new branch. Set parent_id to the newest message the client shows, so a send from a view that another window has changed returns 409 stale_branch instead of continuing a branch the user is not looking at.

Authentication

AuthorizationBearer
OAuth 2.0 device flow or platform session token

Path parameters

deploymentIdstringRequired
Deployment ID
conversationIdstringRequired

Conversation ID (client-chosen UUID v4)

Request

This endpoint expects an object.
contentstringOptional
The user's message text.
attachmentslist of objectsOptional
Ready Files API keys owned by the caller. File bytes are not inlined.
edit_ofstringOptional

A user message this one replaces. The new message starts a new branch, and the old message and its replies stay as another version. Returns 400 invalid_edit for an id that is not a user message in the conversation, and 400 edit_unsupported when the agent does not support edits.

parent_idstringOptional

The newest message the client shows. When it is not the newest message of the conversation’s active branch, the send returns 409 stale_branch and nothing is written. Omit it to skip the check.

Response

Message accepted (reply streams over the SSE endpoint)

message_idstringOptional
timestampdatetimeOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
500
Internal Server Error