Export tickets
Export tickets
Download raw ticket rows as a streamed CSV attachment.
POST
Export tickets
Use the ticket export API to download raw ticket rows as a CSV file.
Required access
| Authentication | Scope | Dataset grant |
|---|---|---|
| API client v2 | tickets.export | tickets.raw |
Body
Export format. Currently only
csv is supported.Optional list of columns to include. If omitted, Sagepilot exports the default ticket columns and appends workspace custom fields automatically.
Built-in column key, or any label you want for a custom-field integration column.
Optional CSV header label.
Sagepilot custom field ID. Include this when exporting a workspace custom field.
Same filter object used by analytics queries.
Channel UUIDs to include in the export. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
Ticket statuses to include. Current constraint: at most one status per export request.
Optional sort instructions.
Field to sort by, such as
created_at.Sort direction. Use
asc or desc.Timezone used for formatted datetime columns.
Maximum rows to export. The maximum supported value is
50000.Optional date preset.
Optional date field selector.
Optional saved-view identifier.
Built-in columns
Common built-in column keys include:codestatusprioritycreated_atupdated_atcustomer_namecustomer_phonecustomer_emailchannel_idtagsclosed_atagent_namepilot_name
Response
The response is a streamed CSV attachment.Notes
- Use ticket export when you need row-level CSV data for spreadsheets, warehouse jobs, or offline analysis.
- Use the analytics API when you need aggregates, ratios, trends, or grouped summaries.