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
Body
Optional list of columns to include. If omitted, Sagepilot exports the default ticket columns and appends workspace custom fields automatically.
Channel UUIDs to include in the export. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
Built-in columns
Common built-in column keys include:codestatusprioritycreated_atupdated_atcustomer_namecustomer_phonecustomer_emailchannel_idtagsclosed_atqueued_atdequeued_atagent_namepilot_name
queued_at is when a ticket last entered a team queue, and dequeued_at is when it left that queue, usually because it was assigned to an agent. If a ticket is queued more than once, both columns describe the most recent time, and dequeued_at stays blank while the ticket is still waiting. Tickets assigned without going through a queue leave both columns blank.
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.