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 type | Endpoint |
|---|---|
| Contacts | POST /exports/contacts |
| Delivery reports | POST /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
| Action | Endpoint |
|---|---|
| Export contacts | POST /exports/contacts |
| Export delivery reports | POST /exports/delivery-reports |
| Export message history | POST /messages/history/export |
| List exports | GET /exports |
| Get download link | GET /exports/{exportId} |
| Regenerate expired link | POST /exports/{exportId} |
| Browse message history | GET /messages/history |
See the Export API Reference and Message History API Reference for full details.