Skip to main content
POST
https://api.trillet.ai
/
v2
/
api
/
call-history
/
export-csv
Export Call History CSV
curl --request POST \
  --url https://api.trillet.ai/v2/api/call-history/export-csv \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-workspace-id: <x-workspace-id>' \
  --data '
{
  "includeTranscripts": true,
  "includePostAnalysis": true,
  "limit": 123,
  "batchId": "<string>",
  "agentId": "<string>",
  "status": "<string>",
  "direction": "<string>",
  "dateRange": {
    "startDate": "<string>",
    "endDate": "<string>"
  }
}
'

Headers

x-api-key
string
required
API key used for authenticating requests to the API.
x-workspace-id
string
required
Workspace identifier for the API.

Request Body

includeTranscripts
boolean
default:"false"
Whether to include full call transcripts in the export.
includePostAnalysis
boolean
default:"false"
Whether to include post-call analysis data in the export.
limit
number
Maximum number of records to export.
batchId
string
Filter by batch call ID.
agentId
string
Filter by agent ID.
status
string
Filter by call status.
direction
string
Filter by call direction.
dateRange
object
Date range filter.

Response

The response is streamed as a CSV file with Content-Type: text/csv and Content-Disposition: attachment headers. The CSV includes columns for call ID, phone numbers, direction, status, duration, agent, flow name, cost, summary, variables, and optionally transcript and post-analysis data.