Send Message
POST/v1/conversations
Send a message to an AI agent and receive a response.
Creates a new conversation if conversation_id is not provided, or continues
an existing conversation. Supports both streaming and non-streaming responses.
Streaming Mode (stream: true):
- Returns
text/event-streamcontent type - Real-time Server-Sent Events (SSE)
- Event types include:
metadata: Initial message metadataconversation_created: New conversation info (if created)thought_chunk: Agent's reasoning processtool_call: Tool invocation detailstool_intervention_required: Approval requested for a tool calltool_intervention_resolution: Result of the approval decisiontool_output: Tool execution resultsmessage: Response content chunksclose: Stream completion signal
Non-Streaming Mode (stream: false or omitted):
- Returns
application/jsoncontent type - Complete response with full message content
- Includes conversation_id and message_id
Optional Parameters:
collection_id: Reference documents from a specific collectionuploads: List of file upload metadata for live file uploads (document IDs from KMS)is_incognito: Private mode (not saved to history)message_only: Return only message content without thoughts/stepsrun_in_background: Return HTTP 202 immediately and finish processing in-processbypass_tool_approval: Automatically approve eligible tools (default:true). Set tofalseto require approval.
Request
Responses
- 200
- 202
- 401
- 403
- 404
- 422
- 500
Successful response. Returns JSON for non-streaming or Server-Sent Events for streaming requests.
Request accepted for in-process background processing. The response body is empty.
Authentication failed - Invalid or missing credentials
Permission denied - Insufficient privileges
Resource not found
Validation error - Invalid request data
Internal server error