POST/v1/postflows/{id}/items/batch

Create items in a Postflow in one batch

Up to 5,000 items or 20 MB, each the body of a single create. The batch is checked as a whole (the Postflow, the Idempotency-Key) and answered 202 with an ingestion; its items are made by a job with the single create's rules, in order. Read each item's outcome (its card or the reason it was refused) from GET /v1/ingestions/{id} and its rows, the error file or the ingestion.completed webhook. Duplicates within the batch (the same address, or the same externalId) make no card. The same Idempotency-Key with the same body answers the same ingestion. Counts toward the itemCreate rate limit by its items: a batch is let in while the minute has room left and then counts in full. Under load new batches are refused with 429 ingestions_busy and Retry-After.

Scope items.writeIdempotent with a keyRate limit class itemCreate

Path parameters

idstringrequired

Headers

Idempotency-Keystringmax length 255

Up to 255 characters, scoped to the organisation and the endpoint, kept for 24 hours: a repeat with the same body replays the stored response with Idempotent-Replayed: true (API-004).

Body

itemsarray of objectsrequiredmin items 1max items 5000
6 fields
recipientobjectrequired
6 fields
namestringmax length 200
addressLine1stringmax length 200
addressLine2stringmax length 200
postalCodestringmax length 20
citystringmax length 120
countrystringmax length 40
variablesobjectdefault {}
sendDatedate
externalIdstringmin length 1max length 200
metadataobject
advertisingCategorystring or null

Returns

13 fields of the 202 answer
idstringrequired
kindenumrequired
postflow_batchpostflow_file
statusenumrequired
UPLOADEDPARSINGPROCESSINGDONEFAILEDCANCELLEDEXPIRED
postflowIdstringrequired
formatenumrequired
jsonndjsoncsv
isTestbooleanrequired
countsobjectrequired
7 fields
totalintegerrequired
processedintegerrequired
createdintegerrequired
needsAttentionintegerrequired
suppressedintegerrequired
duplicatesintegerrequired
refusedintegerrequired
errorsarray of objectsrequired
2 fields
codestringrequired
messagestringrequired
errorFileobject or nullrequired
2 fields
rowsintegerrequired
pathstringrequired
createdAtstringrequired
startedAtstring or nullrequired
finishedAtstring or nullrequired
purgedAtstring or nullrequired

Responses

202The batch was accepted
401Authentication required or API key invalid
403Permission or scope missing, organisation suspended
404Not found
409A request with this Idempotency-Key is still in progress (idempotency_in_progress)
413The body is larger than 20 MB (import_too_large)
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)