Skip to main content
POST
Export tickets
Use the ticket export API to download raw ticket rows as a CSV file.

Required access

Body

string
default:"csv"
required
Export format. Currently only csv is supported.
object[]
Optional list of columns to include. If omitted, Sagepilot exports the default ticket columns and appends workspace custom fields automatically.
string
Built-in column key, or any label you want for a custom-field integration column.
string
Optional CSV header label.
string
Sagepilot custom field ID. Include this when exporting a workspace custom field.
object
Same filter object used by analytics queries.
string[]
Channel UUIDs to include in the export. Find channel IDs in Settings > API Details > Channels. See Resource IDs.
string[]
Ticket statuses to include. Current constraint: at most one status per export request.
object[]
Optional sort instructions.
string
Field to sort by, such as created_at.
string
Sort direction. Use asc or desc.
string
default:"UTC"
Timezone used for formatted datetime columns.
integer
default:"50000"
Maximum rows to export. The maximum supported value is 50000.
string
Optional date preset.
string
Optional date field selector.
string
Optional saved-view identifier.

Built-in columns

Common built-in column keys include:
  • code
  • status
  • priority
  • created_at
  • updated_at
  • customer_name
  • customer_phone
  • customer_email
  • channel_id
  • tags
  • closed_at
  • agent_name
  • pilot_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.