POST/api/v1/projects/{project_id}/lists/{list_id}/subscribers/import
Needs scope: writeIdempotency-KeyMCP tool: import_subscribers
operationId import_subscribers
Import subscribers
Adds up to 10 000 records to the list in one request, each by the rule
of add_subscriber (normalized email, attributes merged, status by the
list), as if added one by one in order, and answers record by record.
An invalid record is reported by its index and fails nothing else; two
records of one address are merged into one subscriber in order. Needs
scope write. A repeat adds nothing twice and changes no status.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
project_idrequired |
path | string · uuid | The project’s id |
list_idrequired |
path | string · uuid | The list’s id |
Idempotency-Key |
header | string
1–128 characters · pattern |
A key of the client’s choosing, one per request it means to send once (a UUID will do). A repeat with the same key and the same body within 24 h creates nothing again and gets the first answer, marked Idempotent-Replayed: true. The key belongs to the API key that sent it. Only a 2xx answer is kept: after any other answer the key is free again. |
Request body
application/json · required
- ImportSubscribersRequest object · all fields required
-
subscribersarray of CreateSubscriberRequestThe records, up to 10 000, in order; the response names an invalid one by its index here.
≤ 10000 items
2 fields
- CreateSubscriberRequest object · all fields required
-
attributesobjectAttributes to set: a map of string, number or boolean values.
nullfor a key removes it. Up to 64 keys, up to 4 KB of JSON. -
emailstring · emailThe address; any case and surrounding whitespace are normalized.
example
ann@example.com
Responses
200
The import’s report
| Header | Type | Description |
|---|---|---|
Idempotent-Replayed | string · enum | true when the answer is a replay of an earlier request with the same Idempotency-Key; absent otherwise. |
- SubscriberImportReport object · all fields required
-
createdintegerRecords whose address was not on the list: new subscribers.
≥ 0
-
invalidarray of InvalidImportRecordRecords not added, by index.
5 fields
- InvalidImportRecord object · all fields required
-
codestringinvalidorinvalid_type, as inerrorsof a422.example
invalid -
emailstringThe email as the record had it.
-
fieldstringThe record’s field:
email,attributesorattributes.<key>.example
email -
indexintegerThe record’s index in
subscribers, from 0.≥ 0
-
messagestring
-
pending_confirmationintegerOf the created subscribers, those
pending(the list has double opt-in).≥ 0
-
updatedintegerValid records whose address was already on the list or came earlier in the batch: merged into that subscriber, its status kept.
≥ 0
409
The project or list is deleted (conflict); or a request with the same Idempotency-Key has not answered yet (idempotency_key_in_progress)
422
The body’s shape, every problem in errors (validation_failed; a record’s field is named subscribers.<index>.<field>), or more than 10 000 records (subscribers / invalid); nothing is written; or the Idempotency-Key was used in the last 24 h for another request (idempotency_key_reused), or is not 1 to 128 visible ASCII characters (validation_failed, field Idempotency-Key)
429
The key is over its rate limit, api.rate_limit_per_minute requests a minute on this node (rate_limited)
| Header | Type | Description |
|---|---|---|
Retry-After | integer | Seconds until the key’s next request passes; rounded up. |
504
Postwind’s storage did not answer within its time limit (storage_timeout). A change the request makes may still take effect: check before repeating it. A repeat with the same Idempotency-Key never runs it twice: it is 409 idempotency_key_in_progress until the key’s 24 h end