Skip to main content
POST
/
platform-api
/
v1
/
exports
/
voice_calls
Export voice calls
curl --request POST \
  --url https://app.sagepilot.ai/platform-api/v1/exports/voice_calls \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "format": "<string>"
}
'
Use the voice call export API to download filtered call rows as a CSV file.

Required access

AuthenticationScopeDataset grant
API client v2tickets.exporttickets.raw

Body

format
string
default:"csv"
required
Export format. Currently only csv is supported.
filters
object
Voice call filters to apply before exporting rows.
custom_fields
object
Optional object mapping voice-call custom field IDs to filter values.
custom_fields.<field_id>
string
Custom field value filter for the given Sagepilot custom field ID.
timezone
string
default:"UTC"
Timezone used for formatted datetime columns.
limit
integer
default:"500000"
Maximum number of rows to stream in the CSV export.

Filters

filters.status
string
Call status. Supported values include pending, ended, missed, failed, active, scheduled, or all.
filters.mode
string
Comma-separated call modes, such as ai, human, ai_to_human, or human_to_ai.
filters.direction
string
Call direction. Use inbound or outbound.
filters.channel
string
Comma-separated channel UUIDs. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
filters.channel_kind
string
Comma-separated channel kinds, such as voice or whatsapp.
filters.customer_id
string
Customer UUID to filter calls by.
filters.assignee
string
Comma-separated human agent or AI agent UUIDs. Use current where the API request is associated with a user context. See Resource IDs.
filters.team
string
Comma-separated team UUIDs. See Resource IDs.
filters.disposition
string
Comma-separated disposition values.
filters.hangup_reason
string
Comma-separated terminal reasons, such as voice_mail.
filters.tags
string
Comma-separated tag IDs.
filters.source
string
Comma-separated call sources, such as direct, journey, or campaign.
filters.campaign
string
Comma-separated campaign IDs.
filters.journey
string
Comma-separated journey IDs.
filters.template
string
Comma-separated messaging template IDs sent during the call.
filters.sentiment
string
Comma-separated sentiment values, such as positive, neutral, or negative.
filters.has_recording
string
Use true or false to filter by recording availability.
filters.has_transcript
string
Use true or false to filter by transcript availability.
filters.duration_min
integer
Minimum call duration in seconds.
filters.duration_max
integer
Maximum call duration in seconds.
filters.date_range
string
Date preset or explicit range. Supported values include today, yesterday, last_7_days, last_30_days, and start|end.
filters.date_filter_field
string
Date field used with date_range. Supported values are created_at, answered_at, and ended_at.
filters.sort_by_field
string
Field used for ordering. Supported values include created_at, answered_at, ended_at, and duration_seconds.
filters.sort_order
string
Sort direction. Use asc or desc.
filters.no_assignee
string
Use true to return unassigned calls.

Default columns

The CSV includes these default columns, followed by enabled voice-call custom fields:
  • Call Code
  • Call ID
  • Direction
  • Mode
  • Status
  • Created At
  • Answered At
  • Ended At
  • Duration
  • Hangup Reason
  • Ended By
  • Customer Name
  • Customer Phone
  • Customer Email
  • Customer Company
  • From Number
  • To Number
  • Agent
  • Pilot
  • Team
  • Channel
  • Channel Type
  • Disposition
  • Disposition Set By
  • Summary
  • Sentiment
  • Recording URL
  • Has Transcript
  • Source
  • Campaign ID
  • Journey ID
  • Scheduled At
  • Scheduled By
  • Tags
  • Transcript

Notes

  • Use voice call export when you need row-level CSV data for calls, recordings, transcripts, dispositions, and call-level custom fields.
  • The endpoint appends enabled voice-call custom fields after the default CSV columns.