v1
latestOpenAPI 3.0.12026-07-226992320.0 KBChats
List Chats
Returns a paginated list of chat sessions for the account, sorted by most recently created first. Use the status parameter to filter by session state. Use page and size to navigate through results.
get/v1/chats
Query parameters
statusstring
Filter chats by their current session state. Accepted values: 'in_progress', 'ended'. Omit to return chats in all states.
pageinteger
Zero-based page number to retrieve. Use 0 for the first page. Must be 0 or greater.
sizeinteger
Number of chats to return per page. Must be 1 or greater. Defaults to 10.
Response
OK
Example response
{
"data": [
{
"chatId": "chat-d17T6uReChpyfFeP",
"agent": {
"name": "New AI Agent",
"agentId": "agent_D5D0p7TUs66TTAEAx",
"status": "Live"
},
"createdAt": "2021-04-20T10:00:00.000Z",
"status": "ended",
"response": [
{
"id": "item_G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
],
"messages": [
{
"id": "item_G9YdhDqua0EngI1G",
"role": "assistant",
"type": "message",
"content": [
"Hello! My name is Grace, and I'm calling on behalf of SigmaMind AI. Am I speaking with Michael?"
]
}
],
"dynamicVariables": {
"customer_name": "Michael",
"account_id": "ACC-001"
}
}
],
"size": 20,
"totalCount": 125,
"totalPages": 7,
"hasNext": true
}