Export Call History
Call History
Export Call History
Export filtered call history as CSV, XLSX, or JSON
GET
Export Call History
Description
Exports call history as a downloadable file. Uses the sameGET /v1/voice/calls endpoint as List Call History,
but switches to export mode when the format query parameter is set to
csv, xlsx, or json.
Exports paginate through the full result set server-side (no 1000 row cap)
and apply every filter supported by the list endpoint.
- CSV — streamed row-by-row, safe for very large exports.
- XLSX — buffered Excel workbook (
.xlsx), good for most business reports. - JSON — single JSON document with a
callsarray; use for programmatic consumption.
Safety Cap
Exports are capped at 50,000 rows per call. When the cap is hit, the response still returns200 with the first 50,000 matching rows and the
X-Export-Truncated response header set to true. Narrow the time window
or add filters to page through larger result sets.
Authentication
Your Teli API key
Query Parameters
Export Control
Export format. One of:
csv, xlsx, json. Omit to use the standard
paginated JSON list response instead.Comma-separated list of column ids to include, in order. Omit to use the
default set.Valid ids:
call_id, start_time, end_time, duration_seconds, from_number,
to_number, direction, agent_name, user_sentiment, call_successful,
in_voicemail, call_status, recording_url, campaign_id, contact_id,
transcript.Default:
call_id, start_time, duration_seconds, from_number, to_number, direction, agent_name, user_sentiment, call_successful, in_voicemail, recording_url, campaign_idWhen
true, each distinct key observed across all exported calls’
extracted_fields becomes its own column, named extracted.{key} (CSV/XLSX)
or grouped under an extracted_fields object (JSON). Set to false to
omit extracted data entirely.Scope
Organization
unique_id to filter callsUser
unique_id (required for non-admin users)true returns all organization calls; false restricts to the caller’s own callsFilters (identical to the list endpoint)
Filter by agent (unique_id or internal UUID)
ended, ongoing, or errorinbound or outboundPositive, Negative, Neutral, or Unknowntrue or falsetrue or falsetrue to include only calls with a recording URL; false for calls withoutFilter by campaign UUID
Substring match against
from_number OR to_number. The leading + is
stripped, so 4155551234 and +4155551234 behave the same.Minimum
call_duration_ms (inclusive)Maximum
call_duration_ms (inclusive)ISO-8601 lower bound on call start time (e.g.,
2026-04-01T00:00:00Z)ISO-8601 upper bound on call start time
Response Headers
Every export response includes these headers:| Header | Description |
|---|---|
Content-Type | text/csv; charset=utf-8, the XLSX MIME type, or application/json; charset=utf-8 |
Content-Disposition | attachment; filename="call-history-YYYYMMDD-HHMMSS.<ext>" |
X-Export-Row-Count | Number of rows included in the body |
X-Export-Row-Cap | The server-side safety cap (currently 50000) |
X-Export-Truncated | true when the cap was reached, otherwise false |
Example Requests
CSV export (defaults)
cURL
XLSX export with custom columns
cURL
JSON export with filters
cURL
JavaScript
Python
Example Responses
CSV body (abbreviated)
JSON body
Missing organization_id
400
Organization not found
404
Behavior
- Filter parity — every filter accepted by
GET /v1/voice/callsalso applies to the export. Exports and the paginated list view use the same query contract. - No row cap surprise — exports paginate through Teli’s database server-side in 500-row pages. The only limit is the 50,000-row safety cap per request.
- Tenant- and org-scoped — only calls belonging to the calling tenant
and the
organization_idyou specify are included. Non-admin callers are further restricted to their ownuser_id. - Phantom-call filtering — zero-duration fork artifacts are excluded from exports, matching the list endpoint.
- Dynamic extracted columns — when
include_extracted_fields=true, the exporter scans every exported row and emits one column per distinctextracted_fieldskey observed across the full result set. - Transcripts — opt in by adding
transcriptto thecolumnslist. Transcripts can be long and will increase file size substantially.
Pagination for Large Exports
IfX-Export-Truncated is true, you have more than 50,000 matching calls
for the given filters. Paginate by narrowing the date range:
Related Endpoints
GET /v1/voice/calls— paginated JSON list of calls (same filters)GET /v1/voice/calls/{call_id}— full call detail, including transcriptGET /v1/voice/calls/{call_id}/recording— signed recording URLGET /v1/voice/calls/{call_id}/extractions— structured extraction for one call

