Message
Sends a message to the Chat agent and triggers an AI response.
POST /api/agents/chat/message
Request Body
{
"message": "Hello, I need help with pricing.",
"agentId": "123e4567-e89b-12d3-a456-426614174000",
"site_id": "123e4567-e89b-12d3-a456-426614174000",
"conversationId": "optional-uuid",
"lead_id": "optional-uuid",
"visitor_id": "optional-uuid",
"team_member_id": "optional-uuid"
}| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | The content of the message to send. |
agentId | string | Yes | The UUID of the agent handling the chat. |
site_id | string | Yes | The UUID of the site. |
conversationId | string | No | The UUID of the conversation. If not provided, a new one is created. |
lead_id | string | No | The UUID of the lead (if authenticated). |
visitor_id | string | No | The UUID of the visitor (if anonymous). |
team_member_id | string | No | The UUID of a team member if they are sending the message on behalf of a user. |
Response
{
"success": true,
"data": {
"commandId": "uuid",
"status": "completed",
"conversation_id": "uuid",
"conversation_title": "Pricing Inquiry",
"messages": {
"user": {
"content": "Hello, I need help with pricing.",
"role": "user"
},
"assistant": {
"content": "I can help with that. Our pricing starts at...",
"role": "assistant"
}
}
}
}Last updated on