Send a chat message
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
Path parameters
Conversation ID (client-chosen UUID v4)
Request
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.
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)