Subscribers

Import contacts, in the background

POST /api/v1/lists/{list_uid}/subscribers/bulk/async

Queues an import and answers at once with the job to follow. Send the contacts as JSON, in the same shape as the import in the request, or upload a CSV file with a mapping of its columns. Follow the job with the import job call. Limited to 60 calls a minute.

Parameters
list_uid string required path
The list's uid.
Request body application/json
subscribers array of object required
The contacts, as for the import in the request.
mode string
One of: overwrite, skip.
Default: overwrite
overwrite_status boolean
Default: 0
overwrite_tags boolean
Default: 0
Request body multipart/form-data
file file required
The CSV file.
mapping string required
JSON: each CSV column → the tag of a field (or the id of a field).
mode string
One of: overwrite, skip.
Default: overwrite
overwrite_status boolean
Default: 0
overwrite_tags boolean
Default: 0
Responses
202 The import is queued.
400 Neither contacts nor a file, or a file without mapping.
401 The token is missing or wrong (Unauthenticated.), or its user may not act on this object (Unauthorized). Without the Accept: application/json header, a missing or wrong token answers with a redirect to the sign-in page instead.
403 The token's user may not import into this list.
404 No list has this uid.
422 mode is wrong, or mapping names a field the list does not have.
Import contacts, in the background · application/json
1 2 3 4 5
curl -X POST 'https://your-domain/api/v1/lists/6adaabbf98847/subscribers/bulk/async' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subscribers":[{"EMAIL":"alice@example.com"},{"EMAIL":"bob@example.com"}]}'
Import contacts, in the background · multipart/form-data
1 2 3 4 5
curl -X POST 'https://your-domain/api/v1/lists/6adaabbf98847/subscribers/bulk/async' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F 'file=@subscribers.csv' \
  -F 'mapping={"Email":"EMAIL","First Name":"FIRST_NAME"}'
Response
{
    "job_uid": "6af7d91f0e1c7",
    "status": "queued",
    "status_url": "https://your-domain/api/v1/import-jobs/6af7d91f0e1c7",
    "cancel_url": "https://your-domain/api/v1/import-jobs/6af7d91f0e1c7"
}