Send Chat Message
POST/api/chat/message
This endpoint sends a message to a specified conversation within a workspace. The request must include a valid API key and user ID.
Request
Header Parameters
API key to authorize the request.
ID of the user making the request.
- application/json
Body
required
ID of the workspace.
ID of the conversation.
The message to be sent.
ID of the agent, if applicable. Example - agenframe
Flag to disable memory usage.
Indicates if this is the first message in the conversation.
Responses
- 200
- 400
- 403
- 404
- 500
Successfully sent the message and retrieved follow-up questions and source snippets.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Array [
]
data
object
The ID of the response.
The query that was sent.
ID of the agent if applicable.
Timestamp when the response was created.
Name of the root agent handling the query.
stepsBreakdown
object[]
Name of the agent handling the step.
Content and responses from the agent.
External source used for the step.
Unique identifier for the step.
Type of step (e.g., 'rag').
followUps
object
Unique identifier for the follow-up group.
sourceSnips
object[]
ID of the source chunk.
Extracted content snippet.
Short preview of the snippet.
Name of the source file.
Type of the source file.
URL of the source document.
The type of the message, which is 'response'.
{
"data": {
"id": "string",
"query": "string",
"agentid": "string",
"createdat": "2025-02-05T11:57:14.187Z",
"dislikes": [
"string"
],
"likes": [
"string"
],
"rootAgentName": "string",
"stepsBreakdown": [
{
"agentname": "string",
"content": {},
"external": "string",
"step_id": "string",
"type": "string"
}
],
"suggested_files": [
"string"
],
"followUps": {
"id": "string",
"questions": [
"string"
]
},
"sourceSnips": [
{
"chunkid": "string",
"content": "string",
"displaytext": "string",
"filename": "string",
"filetype": "string",
"url": "string"
}
],
"type": "string"
}
}
Invalid body or fetch operation failed.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating the issue with the request body or fetch operation.
{
"error": "string"
}
Invalid API key.
- application/json
- Schema
- Example (from schema)
Schema
error
object
Detailed error message indicating that the API key is invalid.
{
"error": {
"message": "string"
}
}
Conversation or workspace not found.
- application/json
- Schema
- Example (from schema)
Schema
error
object
Error message indicating that the conversation or workspace was not found.
{
"error": {
"message": "string"
}
}
Internal server error.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating an internal server error.
{
"message": "string"
}