Skip to main content
POST
/
v1
/
agents
/
sessions
/
{session_id}
/
messages
Send Message
curl --request POST \
  --url https://api.mixpeek.com/v1/agents/sessions/{session_id}/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "metadata": {},
  "stream": true
}
'
{
  "status": 123,
  "error": {
    "message": "<string>",
    "type": "<string>",
    "code": "<string>",
    "details": {}
  },
  "success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

session_id
string
required

Session ID

Body

application/json

Request payload for sending a message to the agent.

Attributes: content: Message text content metadata: Optional message metadata stream: Whether to stream response as SSE (default: True)

Note: When stream=True, the response will be Server-Sent Events (SSE). When stream=False, the response will be a MessageResponse object.

Example: ```python # Streaming request (SSE) request = SendMessageRequest( content="Find videos about machine learning", stream=True )

# Non-streaming request
request = SendMessageRequest(
    content="Find videos about machine learning",
    stream=False
)
```
content
string
required

Message text content (REQUIRED)

Minimum string length: 1
metadata
Metadata · object

Message metadata (OPTIONAL)

stream
boolean
default:true

Stream response as SSE (default: True)

Response

Successful Response