Skip to main content
This API endpoint provides access to the complete history of business message conversations with advanced filtering and pagination capabilities. It’s designed for administrative dashboards, reporting, and analytics purposes.

API Endpoint

Authentication: Requires staff-level permissions
Content-Type: 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 identifier
  • title: Conversation title/subject
  • last_message_date: Timestamp of the last message
  • creation_date: Thread creation timestamp
  • messages_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 conversation
  • llm_judge_need_review: Whether AI judge flagged for manual review
  • llm_judge_improvement: AI judge improvement suggestions

User Information

  • user: Complete user object with id, email, first_name, last_name
  • reviewer: Reviewer user object (if conversation was reviewed)
  • user_type: User permission level/type

Conversation Context

  • agent_names: Array of AI agent names that participated
  • ask_to_talk_to_human: Whether user requested human support
  • tags: Array of conversation tags
  • ticket_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=true will increase response size and processing time. The feature uses optimized queries to prevent N+1 issues, but should be used judiciously for large datasets.