Export contacts

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
FieldTypeDescription
qstringFree text: email, first and last name, and with 3+ digits the SMS number.
statusenumsubscribed | unsubscribed—
phoneenumhas | none—
segment_idstringMembers of this segment. Also needs `segments:read`.
segment_subscriptionenumsubscribed | opted_outWith a static `segment_id`: its per-segment opt-out.
Response · 202 fields10 fields
FieldTypeDescription
objectrequiredstring—
idrequiredstring—
kindrequiredstring—
statusrequiredenumQUEUED | RUNNING | COMPLETED | FAILED | CANCELED—
totalrequiredinteger | null—
processedrequiredinteger—
failedrequiredinteger—
errorrequiredstring | null—
created_atrequiredstring—
completed_atrequiredstring | null—
202400401403404409422429502

Search docs and guides

Search the docs and product guides.