Automatically import completed external conversations
When your external chatbot closes a conversation, send its complete text transcript toPOST /api/v1/conversations/import. The external system handles collection, normalization,
and delivery; AGO stores the transcript and runs the enabled quality/CX and topic analyses
in the background, including for historical conversations.
Use an API key with conversations:write. Configure an AGO agent to represent your external
chatbot and provide its ID on every import. Its instructions provide context for the analysis;
importing does not run the chatbot or execute its tools. Enable the Thread Evaluator and Topic
Analyzer in AGO to run those analyses.
source, external_id, agent_id, user.external_id, and messages are required; title
is optional. Source names use lowercase letters, digits, dots, underscores, or hyphens,
start with a letter or digit, and are at most 100 characters. External IDs are at most
255 characters. Participants are identified within each source and do not need an AGO login.
Messages must contain nonblank text, use user or assistant, and include dates with a
timezone. Include at least one message of each role in chronological order. Equal dates
retain the supplied order. A request accepts at most 1,000 messages, 100,000 characters per
message, and 1 MB of normalized JSON. Unsupported fields, attachments, and tool traces are
rejected; no content is silently truncated.
Delivery, retries, and results
- 201: stored successfully. The response contains the AGO conversation
idandprovenance, including the source, external ID, reception time, and separateanalyses.evaluationandanalyses.topicsstatuses. - 200: the same transcript was already imported. AGO returns the same ID. Completed analyses are preserved; failed analyses or previously disabled analyses that are now enabled can be queued again.
- 409: this source and external ID already identify a different transcript. AGO leaves the existing conversation unchanged. Transcripts cannot be appended to or replaced.
GET /api/v1/conversations/{id} with conversations:read (or conversations:write) to
retrieve the transcript, topics, cx_score, cx_score_data, provenance, and read_only.
Each analysis status is pending, running, completed, failed, or disabled.
Analysis failures receive three automatic retries with increasing delays. Interrupted work
and queue delivery failures are recovered automatically by a daily sweep; the initial HTTP
response does not wait for analysis completion. A failed status includes an error_code without exposing
provider credentials or transcript contents.
Filter by provenance
The public conversation list and export, internal history API, and dashboard analytics acceptconversation_source:
GET /api/v1/conversations/import-sources lists the available external sources. This filter
is separate from the browser-origin filter. Dates in reports reflect the original transcript,
not the day it was imported. Import participant profiles do not count as new AGO registrations.
Imported conversations appear in the existing review screens. Their transcripts are read-only;
administrators can still evaluate them, add comments, and manage labels. Imports do not
include tool usage, generation costs, latency, tickets, or declared satisfaction data.
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. This example shows a selection of its fields: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 (OK,KO,NEUTRAL, orNOT_EVALUATED)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 includes a messages array. For example:
messages: Array of all messages in chronological order- Each message includes agent information, knowledge sources, and role details
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
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.
- Caching: Consider implementing client-side caching for frequently accessed data.
- Message Inclusion: Using
include_messages=truewill increase response size and processing time. Use it when you need the transcript contents.
