curl --request GET \
--url https://{host}/api/v1/cdrs/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/cdrs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/cdrs/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Export a period's calls
Streamed, oldest first: CSV (a header row, then one row per call) or NDJSON (one JSON object per line). At most 31 days per request. Columns: call_uuid, organisation_id, direction, caller_number, destination_number, dialled_number, started_at, answered_at, ended_at, duration_sec, billsec, hangup_cause, agent_id, extension_id, team_id, contact_id, campaign_id, reference, recorded, billing_mode, sell_amount (empty without billing:read). Narrowed like the call list. Requires cdrs:read.
curl --request GET \
--url https://{host}/api/v1/cdrs/export \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/api/v1/cdrs/export', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/api/v1/cdrs/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"error": {
"code": "invalid_request",
"message": "<string>"
}
}Authorizations
Every request sends Authorization: Bearer <token>. The token is either a panel session (a JWT from /auth/login, 12 hours) or an API key ft_<id>_<secret>. An API key is accepted only from an address on its IP allowlist (403 ip_not_allowed otherwise; 403 ip_allowlist_required for an old key that has none), is limited to its rate per minute (429 rate_limited with Retry-After; X-RateLimit-Limit/Remaining/Reset on every response), and at most 60 call placements a minute.
Query Parameters
csv, ndjson Narrow to one organisation. Outside your scope returns 403.
Response
The file
The response is of type string.