Export contacts
POST/api/v1/contacts/export
POST /contacts/export
curl -X POST 'https://www.unitpost.com/api/v1/contacts/export' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"status": "subscribed"
}'Response · 202
{
"object": "job",
"id": "id_123",
"kind": "string",
"status": "QUEUED",
"total": 1,
"processed": 0,
"failed": 0,
"error": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z"
}Export contacts to a CSV file, as the Contacts page's Export does: every contact, or the ones the list's filters match (q, status, phone, segment_id, segment_subscription, as on List contacts). It runs as a background job: follow it with Retrieve a job, then fetch the file with Download a job's file. One export runs at a time: another while it runs is a 409 job_in_progress naming it (Location). segment_id also needs segments:read. Requires the contacts:read capability.
Request body5 fields
| Field | Type | Description |
|---|---|---|
q | string | Free text: email, first and last name, and with 3+ digits the SMS number. |
status | enumsubscribed | unsubscribed | — |
phone | enumhas | none | — |
segment_id | string | Members of this segment. Also needs `segments:read`. |
segment_subscription | enumsubscribed | opted_out | With a static `segment_id`: its per-segment opt-out. |
Response · 202 fields10 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
kindrequired | string | — |
statusrequired | enumQUEUED | RUNNING | COMPLETED | FAILED | CANCELED | — |
totalrequired | integer | null | — |
processedrequired | integer | — |
failedrequired | integer | — |
errorrequired | string | null | — |
created_atrequired | string | — |
completed_atrequired | string | null | — |
202400401403404409422429502