{
"query": "Hello",
"pid": "3..",
"chatbot_id": "DKDvwn...",
"user_context": {
"session_id": "6ff922ed-9884-4430-83c9-7ac83a7b0574",
"platform": "web"
}
}| Field | Type | Required | Description |
|---|---|---|---|
query | string | Yes | User message or question sent to the chatbot. |
pid | string | Yes | Project ID associated with the chatbot. |
chatbot_id | string | Yes | Unique chatbot identifier that should process the message. |
user_context | object | Yes | Additional context about the user, session, channel, or client application. |
user_context.session_id | string | No | Unique session identifier used to continue or group messages in the same conversation. |
user_context.platform | string | Yes | Platform or channel where the message originated. Example: web. |
{
"message": "Success",
"data": {
"answer": "Hello! How can I help you with your setup today?",
"session_id": "6ff922ed-9884-4430-83c9-7ac83a7b0574"
}
}| Field | Type | Description |
|---|---|---|
message | string | Status message for the chat request. |
data | object | Contains the AI-generated response and conversation session details. |
data| Field | Type | Description |
|---|---|---|
answer | string | AI-generated response returned by the chatbot. |
session_id | string | Conversation session identifier associated with the response. |
{
"message": "Bad Request",
"error": {
"code": "BAD_REQUEST",
"detail": "Invalid request body or missing required fields."
}
}{
"message": "Unauthorized",
"error": {
"code": "UNAUTHORIZED",
"detail": "Authentication token is missing or invalid."
}
}session_id in user_context to continue an existing conversation.session_id is not provided, your backend may generate or assign a new session depending on implementation.chatbot_id must belong to the specified project ID.curl --location 'https://agents.robofy.ai/v1/ai-agent/chat' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"query": "Hello",
"pid": "3..",
"chatbot_id": "DKDvwn...",
"user_context": {
"session_id": "6ff922ed-9884-4430-83c9-7ac83a7b0574",
"platfrom": "web"
}
}'{
"message": "Success",
"data": {
"answer": "Hello! How can I help you with your setup today?",
"session_id": "6ff922ed-9884-4430-83c9-7ac83a7b0574"
}
}