API Endpoint
application/json
Response Format: JSON with pagination
Overview
The conversations history API allows administrators to:- Retrieve paginated conversation threads
- Filter conversations by multiple criteria
- Access detailed thread information including user data, evaluations, and metadata
- Export and analyze conversation patterns
Request Parameters
All parameters are optional and can be combined for advanced filtering:Date Filtering
User Filtering
Conversation Content
Conversation Status
Knowledge Base
Pagination
Message Data
Note: Each page contains 50 conversations. Use the
count field in the response to calculate total pages.
Response Format
The API returns a paginated response with the following structure:Response Fields
Thread Information
id: Unique thread identifiertitle: Conversation title/subjectlast_message_date: Timestamp of the last messagecreation_date: Thread creation timestampmessages_count: Total number of messages in the thread
Evaluation & Quality
evaluation: Manual evaluation status (good, bad, neutral, etc.)llm_judge_evaluated: Whether AI judge has evaluated the conversationllm_judge_need_review: Whether AI judge flagged for manual reviewllm_judge_improvement: AI judge improvement suggestions
User Information
user: Complete user object with id, email, first_name, last_namereviewer: Reviewer user object (if conversation was reviewed)user_type: User permission level/type
Conversation Context
agent_names: Array of AI agent names that participatedask_to_talk_to_human: Whether user requested human supporttags: Array of conversation tagsticket_created: Whether a support ticket was generated
Messages (when include_messages=true)
When the include_messages parameter is set to true, each thread will include a messages array:
messages: Array of all messages in chronological order- Each message includes agent information, knowledge sources, and role details
- Messages are optimized with efficient database queries to prevent performance issues
Usage Examples
Basic Request
Filter by Date Range
Filter by User and Agent
Filter Conversations Needing Review
Pagination Example
Include Messages in Response
Combined Filtering with Messages
Error Responses
403 Forbidden
400 Bad Request
Performance Considerations
- Pagination: Always use pagination for large datasets. Each page is limited to 50 items.
- Date Filtering: Use date filters to improve query performance on large datasets.
- Indexing: The API is optimized for filtering by date, user, and evaluation status.
- Caching: Consider implementing client-side caching for frequently accessed data.
- Message Inclusion: Using
include_messages=truewill increase response size and processing time. The feature uses optimized queries to prevent N+1 issues, but should be used judiciously for large datasets.
