Skip to main content
Use the Chatarmin CX Public API to load many tickets and their messages in one go. You start an export with one request, check its status until it is ready, and download the result through a time-limited link. You no longer read messages one ticket at a time.

How it works

  1. POST /public/v1/ticket-exports creates the export and returns it right away with status queued.
  2. The export runs in the background, so it can cover as many tickets as you choose, up to 50,000.
  3. GET /public/v1/ticket-exports/{exportId} returns the status. When it is completed, the response also holds a download_url.
  4. You download the file from download_url.
Both endpoints require the tickets:export scope. Create a key in Settings → API. An agent-linked key can only export saved views that agent can see in the inbox, as for GET /views. A key without a linked agent can export any view in the organization.

Nightly sync

Export the tickets of a saved view, with their messages, once a night.
1

Find the view

Call GET /public/v1/views and keep the id of the view that holds the tickets you sync. See Filtering and saved views.
2

Create the export

The response has status 202 and the export in status queued.
3

Poll until it is ready

There are no webhooks. Poll every few seconds until status is completed or failed.
4

Download the file

Download data.download_url and unzip it. Each status call on a completed export returns a fresh link, so request the status again if a link has expired.

Backfill

Export every ticket created in a date range. Dates are YYYY-MM-DD in UTC, both days are included, and they filter on the ticket creation date.
One export holds at most 50,000 tickets. If a range matches more, the request fails with EXPORT_TOO_LARGE. Split the date range into smaller ranges and create one export for each.

Request fields

Choose exactly one of the three selection modes. Unknown fields are rejected with 400 VALIDATION_ERROR. Default columns: ticket_number, subject, contact_first_name, contact_last_name, contact_email, contact_phone, status, assigned_agent_name, created_at, updated_at. Optional columns: priority, channel, channel_name, tags, last_message_at, message_count, ticket_url, csat_score, csat_comment, csat_survey_sent, csat_submitted_at, created_date, created_time, language, social_thread_type, social_post_type, team_name, first_resolved_at, resolved_at.

Read the export

The file

When include_messages is true, the download is a ZIP with tickets.csv and messages.csv. Otherwise the download is a single tickets.csv. Files are UTF-8 without a byte order mark. A selection that matches no tickets still completes, with files that contain only the header row. Tickets are ordered by creation date, oldest first. Messages are ordered by ticket, then by creation date, oldest first. Internal notes and deleted messages are not included. messages.csv has these columns: All timestamps in both files are ISO-8601 in UTC. There is no timezone option.

Limits

See Rate limits.

Differences from the legacy export

POST /public/tickets/export stays available. If you move to the v1 export, these things change. Not supported in v1: excel, eml, order, timezone, and include_ticket_fields. Column names in tickets.csv and messages.csv are the same as in the legacy export.

Errors

See Errors for the error format. Match on code, not on message.