Agents Platform

Send Conversation Message

Changed on

Send input to a conversation, and wait until the agent finishes or waits on client tool results. With background set to true, the endpoint returns 202 when the server admits the turn. Then stream the turn's events with Last-Event-ID set to the stream_cursor. This endpoint is in alpha and may change.

post/v1/convai/conversations/{conversation_id}/messages

Request

Path parameters

conversation_idstring required

The Conversation ID

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Request body

backgroundboolean

If true, return a 202 handle after the turn is admitted instead of waiting for generation to finish.

Response

Successful Response

turn_idstring required
status'in_progress' | 'completed' | 'requires_action' | 'failed' | 'timed_out' required
stream_cursorstring nullable

Resume token for this turn's event stream. Present while the turn is in progress; pass it as Last-Event-ID to stream the turn's events.

Changes