Subscribers

Import contacts, in the request

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

Adds or updates many contacts at once and answers with the result of each row. Rows that fail are listed in errors; the others are saved. When an address appears more than once, its last row wins. For a large import, use the asynchronous call instead: this one runs inside the request. 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. Each one has EMAIL, any field of the list by its tag, and optionally tags (a list) and status.
mode string
What to do with an address the list already holds: update it, or leave it. One of: overwrite, skip.
Default: overwrite
overwrite_status boolean
With overwrite, also replace the status of a contact the list holds.
Default: 0
overwrite_tags boolean
With overwrite, replace its tags instead of adding to them.
Default: 0
Responses
200 What happened to the rows.
400 subscribers is missing or empty.
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 not overwrite or skip, or the import was refused (for example, the plan allows no more contacts).
Import contacts, in the request
1 2 3 4 5
curl -X POST 'https://your-domain/api/v1/lists/6adaabbf98847/subscribers/bulk' \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode":"overwrite","subscribers":[{"EMAIL":"alice@example.com","FIRST_NAME":"Alice","tags":["vip","newsletter"]},{"EMAIL":"bob@example.com","FIRST_NAME":"Bob","status":"subscribed"}]}'
Response
{
    "list_uid": "6adaabbf98847",
    "received": 2,
    "inserted": 1,
    "updated": 1,
    "failed": 0,
    "batch_id": "9d2c4f7e-1b6a-4c55-9a52-61d3e0b7a1c4",
    "errors": []
}