curl --request POST \
--url http://{your-domain}/v1/aibot/bots/{AgentId}/send-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"role": "user",
"content": "<string>"
}
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {}
}
],
"conversationId": "conversation-xxx"
}
'{
"type": "text",
"content": "Hello! How can I assist you today?"
}curl --request POST \
--url http://{your-domain}/v1/aibot/bots/{AgentId}/send-message \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"messages": [
{
"role": "user",
"content": "<string>"
}
],
"tools": [
{
"name": "<string>",
"description": "<string>",
"parameters": {}
}
],
"conversationId": "conversation-xxx"
}
'{
"type": "text",
"content": "Hello! How can I assist you today?"
}Token corresponding to the environment ID, obtained through login authentication
Accept header for streaming response
Agent ID
Array of conversation messages
Show child attributes
Array of available tools for the agent
Show child attributes
Resume info for resuming an interrupted conversation
Show child attributes
Conversation ID for multi-conversation support (optional)
"conversation-xxx"
Agent conversation successful, returns SSE format. Each event follows the SSE specification with JSON data:
data: {"type": "text", "content": "Hello"}
data: {"type": "tool-call-start", "toolCallId": "call_123", "toolCallName": "search"}
data: {"type": "tool-call-args", "toolCallId": "call_123", "delta": "{\"query\": \"weather\"}"}
data: {"type": "tool-call-end", "toolCallId": "call_123"}
data: {"type": "tool-result", "result": "Sunny, 25°C", "toolCallId": "call_123"}
data: [DONE]The response is a stream of Server-Sent Events where each event contains JSON data representing different types of agent interactions.
Was this page helpful?