List User Chats
Chats
List User Chats
GET
List User Chats
List User Chats
This endpoint retrieves all chat sessions for a specific user within your tenant.Authentication
string
required
Authentication header with your tenant’s API key
Path Parameters
string
required
The ID of the user whose chats you want to retrieve
Query Parameters
integer
default:"0"
The number of items to skip before starting to collect results
integer
default:"50"
The maximum number of chats to return
string
default:"desc"
Sort order for chats by creation date. Options: ‘asc’ or ‘desc’
Response
array
Array of chat objects belonging to the user
integer
Total number of chats for this user
integer
Current offset value used for pagination
integer
Current limit value used for pagination
boolean
Indicates if there are more chats available
Chat Object
string
Unique identifier for the chat session
string
The ID of the user who owns this chat
string
The tenant identifier
string
The title of the chat session
object
Configuration object containing metadata and chat settings
string
Timestamp when the chat was created
string
Timestamp when the chat was last updated
string | null
Timestamp of the last message in this chat
integer
Total number of messages in this chat
Error Responses
400: Bad Request
400: Bad Request
Invalid query parameters
404: Not Found
404: Not Found
User not found or no chats exist for this user
500: Internal Server Error
500: Internal Server Error
Server error processing the request
Example Usage
cURL
JavaScript
Python
Notes
- Results are automatically filtered to only include chats belonging to your tenant
- The
orderparameter sorts chats by theircreated_attimestamp last_message_atwill benullfor chats with no messagesmessage_countprovides a quick way to see chat activity without fetching all messages- Use pagination for users with many chats to improve performance