Skip to main content
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

Invalid query parameters
Invalid or missing API key
User not found or no chats exist for this user
Server error processing the request

Example Usage

cURL

JavaScript

Python

Notes

  • Results are automatically filtered to only include chats belonging to your tenant
  • The order parameter sorts chats by their created_at timestamp
  • last_message_at will be null for chats with no messages
  • message_count provides a quick way to see chat activity without fetching all messages
  • Use pagination for users with many chats to improve performance