Skip to main content

Asynchronous Exports

Large data sets (contacts, delivery reports, message history) are exported asynchronously. The API returns a job reference that you poll 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 returns immediately with an export ID. 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.
  • EXPIRED -- The download link has expired (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

You can filter by channel, date range, and delivery status before exporting.

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.