Conversation Export API
The Conversation Export API returns the same rows as the message-level CSV export of the Conversation Analysis page, as JSON, page by page. Use it to load conversations and their validator results into a data warehouse or BI tool.
- Rows: one per message. A conversation without messages, and each finding that matches no message, also get a row (with an empty
message_id). - Window: one agent and a time range on the conversation start time. Conversations of every validation status are included.
- Validator results: one key per validator, named like the validator's column in the CSV export, holding its level on that row.
- Hidden severities: severities your workspace hides on the Conversation Analysis page are hidden here too, exactly as in the CSV export.
GET /api/v1/validator-results is deprecated and will be removed. Use this API instead.
Authentication
Send one of these headers with every request:
X-API-Key: avk_your_api_key_here
Authorization: Bearer <your_jwt_token>
A bearer token needs permission to view conversations. Create API keys under API Keys (see API keys). Each key returns only its own workspace's data.
Read messages
GET {BASE_URL}/api/v1/conversation-export/messages
| Parameter | Required | Description |
|---|---|---|
agent | yes | One agent identifier, as shown on the Conversation Analysis page. |
start_time | yes | Window start, ISO 8601, inclusive. |
end_time | yes | Window end, ISO 8601, exclusive. |
after | no | pageInfo.endCursor of the previous page. Omit for the first page. |
Both bounds filter on the conversation start time, at whole-second precision. A value without a UTC offset is read as UTC. A window can span up to 730 days.
Example
curl -s -H "X-API-Key: $AVON_API_KEY" \
"$BASE_URL/api/v1/conversation-export/messages?agent=support-bot&start_time=2026-10-01T00:00:00Z&end_time=2026-10-02T00:00:00Z"
{
"metadata": {
"agent": "support-bot",
"requested_start_time": "2026-10-01T00:00:00Z",
"requested_end_time": "2026-10-02T00:00:00Z",
"total_conversations": 412,
"returned_count": 500
},
"pageInfo": {
"hasNextPage": true,
"endCursor": "eyJ2ZXJzaW9uIjox..."
},
"results": [
{
"conversation_id": "c-1029",
"message_id": "m-1",
"role": "user",
"content": "I was charged twice this month.",
"message_timestamp": "2026-10-01T09:12:03Z",
"validated_at": "2026-10-01T09:20:41Z",
"agent": "support-bot",
"policy_compliance": "NO ALERT"
},
{
"conversation_id": "c-1029",
"message_id": "m-2",
"role": "assistant",
"content": "I have refunded both charges.",
"message_timestamp": "2026-10-01T09:12:09Z",
"validated_at": "2026-10-01T09:20:41Z",
"agent": "support-bot",
"policy_compliance": "HIGH"
}
]
}
Fields
| Field | Description |
|---|---|
metadata.total_conversations | Conversations in the window, counted on the first page and repeated on every page of the walk. |
metadata.returned_count | Rows on this page (at most 500). |
pageInfo.hasNextPage | true while more pages follow. |
pageInfo.endCursor | Pass it as after to read the next page. Present only when hasNextPage is true. |
conversation_id, agent | The conversation and its agent. |
message_id, role, content, message_timestamp | The message. Empty ("", or null for the timestamp) on a row without a message. |
validated_at | When validator results of the conversation were last written. null while the conversation is not validated yet, or when it was skipped by sampling. It moves when the conversation is validated again. |
| validator column name | That validator's level on this row (the key is the validator's CSV column header): HIGH, MEDIUM, LOW, LABEL, NO ALERT or ERROR. |
NONE can appear for results stored by older versions; treat it as NO ALERT.
A validator key is present only when that validator ran on the conversation. A validator whose id equals one of the fields above (for example content) has its level under validator:<id> instead; new validators cannot take those ids. On a message row, a validator that ran without a finding on that message shows NO ALERT (or ERROR if it failed). A row without a message carries only the validator of its finding.
Paging
Keep agent, start_time and end_time unchanged, and pass the previous endCursor as after until hasNextPage is false. A page can hold no rows while hasNextPage is still true: keep following the cursor.
Read the pages of one walk one after another, not in parallel.
What a walk guarantees. total_conversations is counted when the walk starts; a conversation uploaded into the window during the walk can still appear on a later page. Validator results are read when each page is read. A conversation whose rows span two pages and that is validated again between them can show the old results on the first page and the new ones on the second. The recommended sync below re-pulls recent days and replaces them whole, so such rows are corrected on the next pull.
Check a window before pulling it
GET {BASE_URL}/api/v1/conversation-export/status
Takes agent, start_time and end_time, as above.
{
"agent": "support-bot",
"requested_start_time": "2026-10-01T00:00:00Z",
"requested_end_time": "2026-10-02T00:00:00Z",
"total_conversations": 412,
"not_validated_conversations": 0
}
A window is ready to pull when total_conversations is above 0 and not_validated_conversations is 0. Conversations skipped by sampling do not count as waiting. A total of 0 can also mean that conversations for that period were not uploaded yet.
Recommended sync
- Pull one window per day, by conversation start time.
- Each run, also pull the last few days again: validation results can arrive after a conversation is uploaded, and a conversation can be validated again.
- Replace each pulled day as a whole in your warehouse: delete that day's rows for the agent, then insert the new rows. Do not upsert by
message_id: rows without a message share an emptymessage_id, and a row that disappeared (for example, a finding removed by a new validation) would otherwise stay.
Results that change after your re-pull period are not picked up again. Choose the period to match how late your conversations are uploaded and validated.
Errors
| Status | Meaning | What to do |
|---|---|---|
400 | The after cursor is malformed, belongs to another agent or window, or no longer matches the workspace settings. | Restart the window without after. |
401 / 403 | Missing or invalid credentials, or no permission to view conversations. | Check the API key or token. |
422 | Invalid parameters (for example, end_time not after start_time, or more than one agent), or a page that cannot be built from the stored data. | Fix the request. If it persists for valid input, contact support. |
429 | Another export is running for your deployment. | Wait for the Retry-After header's seconds, then send the same request again. |
504 | The page took too long. | Send the same request again after a short wait. |
Interactive reference
The full schema is in the external API Swagger UI at {BASE_URL}/api/swagger, under conversation-export.