Append a message or client tool results to a Kai assistant chat
POST/v1/workspaces/:workspaceId/ai/chats/:chatId/messages
Appends an ordinary user message when the chat is not waiting for client tools. While a run is waiting, only tool_result parts for its pending client tool-use IDs are accepted. Partial batches are stored without invoking the model; the same run resumes after every expected result arrives. Duplicate, stale, unknown, and repeated result IDs return a conflict. If another response run is active, ordinary input is accepted into a durable per-chat queue. Queued runs execute in message order and use only the conversation prefix through their triggering input. An ordinary append without a mode inherits the chat's current mode; supplying a mode changes the mode for that run and subsequent appends. Client tool results resume their originating run and cannot change its mode.
Request
Responses
- 201
- 400
- 401
- 403
- 404
- 409
- 413
- 500
Appended input and the new or resumed durable run.
The request is malformed or invalid.
Authentication is required or invalid.
The caller is not allowed to perform this action.
The requested resource was not found.
The request conflicts with the current resource state.
The request payload is too large.
The server encountered an unexpected error.