Get Chat Messages
GET/api/chat/messages
This endpoint retrieves messages from a specified conversation within a workspace. The request must include a valid API key and user ID.
Request
Query Parameters
ID of the workspace whose conversations are being retrieved.
ID of the conversation whose messages are being retrieved.
Header Parameters
API key to authorize the request.
ID of the user making the request.
Responses
- 200
- 400
- 403
- 404
- 500
Successfully retrieved chat messages.
- application/json
- Schema
- Example (from schema)
Schema
Array [
Array [
]
Array [
]
]
data
object[]
The query from the conversation.
The type of the message (query or response).
The ID of the query response.
The timestamp when the message was created.
The name of the conversation.
The ID of the owner of the conversation.
followUps
object[]
The ID of the follow-up question.
The text of the follow-up question.
sourceSnips
object[]
The ID of the source snippet.
The text of the source snippet.
{
"data": [
{
"query": "string",
"type": "string",
"queryresponseid": "string",
"createdat": "2024-12-12T17:23:19.621Z",
"name": "string",
"ownerid": "string",
"followUps": [
{
"id": "string",
"text": "string"
}
],
"sourceSnips": [
{
"id": "string",
"text": "string"
}
]
}
]
}
Invalid query parameters.
- application/json
- Schema
- Example (from schema)
Schema
Error message indicating that there was an issue with the query parameters.
{
"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"
}