Skip to main content

Asynchronous Exports

Large data sets (contacts, delivery reports, message history) are exported asynchronously. The API queues a job that you follow through GET /exports until the export is ready for download.

Export workflow​

1. Request export → 2. Poll status → 3. Download file

Step 1: Request an export​

Choose the type of export you need:

Export typeEndpoint
ContactsPOST /exports/contacts
Delivery reportsPOST /exports/delivery-reports
Message history (CSV)POST /messages/history/export

The API answers immediately with 202 Accepted and an empty body. The actual file generation happens in the background.

Step 2: Poll for completion​

GET /exports

List your exports and check their status. Each export will show one of:

  • PENDING -- The export is being generated.
  • COMPLETED -- The file is ready for download.
  • FAILED -- The export could not be generated; request it again.

A completed export stays downloadable until expiresAt. After that isAvailableForDownload turns false and you can regenerate it.

Step 3: Download the file​

Once the export status is COMPLETED:

GET /exports/{exportId}

This returns a download URL. Use it to download the exported file.

Regenerating expired exports​

Download links expire after a period of time. If your link has expired, regenerate it:

POST /exports/{exportId}

This creates a new download URL for the same export data.

Message history export​

Message history has a separate export endpoint that produces a CSV file:

POST /messages/history/export

The request body takes a date range, startDateTime and endDateTime (ISO 8601 with offset, for example 2026-01-01T00:00:00+01:00), and the optional sender and recipient filters. The export covers SMS, RCS, and WhatsApp in a single file; there is no channel or delivery-status filter. The API answers 202 Accepted with an empty body: follow the export through GET /exports as above.

To browse message history without exporting, use:

GET /messages/history

This returns paginated results with filters for channel, date range, and status.

Quick reference​

ActionEndpoint
Export contactsPOST /exports/contacts
Export delivery reportsPOST /exports/delivery-reports
Export message historyPOST /messages/history/export
List exportsGET /exports
Get download linkGET /exports/{exportId}
Regenerate expired linkPOST /exports/{exportId}
Browse message historyGET /messages/history

See the Export API Reference and Message History API Reference for full details.