POST/v1/postflows/{id}/items

Create an item in a Postflow

Accepted with 202: the item starts HELD, or NEEDS_ATTENTION with warnings when the recipient or variables have content problems (repair in the portal or through PATCH), or SUPPRESSED when the address is on the suppression list. Test keys create test items.

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

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

29 fields of the 202 answer
idstringrequired
statusenumrequired
NEEDS_ATTENTIONSUPPRESSEDHELDPENDING_APPROVALREADYSCHEDULED_FOR_RUNIN_PRODUCTIONCOMPLETEDFAILEDCANCELLEDRETURNEDNOT_SENT
customerStatusenumrequired
NEEDS_ATTENTIONSUPPRESSEDSCHEDULEDIN_PRODUCTIONHANDED_TO_CARRIERCOMPLETEDFAILEDCANCELLEDRETURNEDNOT_SENT
needsAttentionbooleanrequired
warningsarray of objectsrequired
3 fields
codeenumrequired
address_invalidpostal_code_invalidhouse_number_missingcity_missingcountry_not_supporteddestination_not_supportedvariable_missingvariable_type_invalidvariable_too_longimage_fetch_failedimage_resolution_lowtext_overflowexpression_invalidlate_delivery_expectedwaiting_for_fundssuppressedcarrier_codes_missingexcluded_from_run
fieldstringrequired
messagestringrequired
sourceenumrequired
POSTFLOWPOSTBATCHSAMPLE
postflowIdstring or nullrequired
postbatchIdstring or nullrequired
templateVersionIdstring or nullrequired
productobjectrequired
4 fields
idstringrequired
specificationIdstringrequired
finishstringrequired
destinationstringrequired
advertisingCategorystring or nullrequired
isTestbooleanrequired
isSamplebooleanrequired
recipientobject or nullrequired
6 fields
namestringrequired
addressLine1stringrequired
addressLine2string or nullrequired
postalCodestringrequired
citystringrequired
countrystringrequired
variablesobject or nullrequired
sendDatedate or nullrequired
externalIdstring or nullrequired
metadataobject or nullrequired
createdAtdate-timerequired
updatedAtdate-timerequired
readyAtdate-time or nullrequired
scheduledAtdate-time or nullrequired
handedToCarrierAtdate-time or nullrequired
completedAtdate-time or nullrequired
failedAtdate-time or nullrequired
cancelledAtdate-time or nullrequired
anonymisedAtdate-time or nullrequired
qrobject or nullrequired
4 fields
shortUrlstringrequired
scanCountintegerrequired
firstScannedAtdate-time or nullrequired
lastScannedAtdate-time or nullrequired
priceobject or nullrequired
11 fields
idstringrequired
unitPriceCentsintegerrequired
listUnitPriceCentsintegerrequired
currencystringrequired
discountPercentnumber or nullrequired
tierQuantityintegerrequired
tierBasisenumrequired
postbatchrolling30d
basisQuantityintegerrequired
vatTreatmentstringrequired
vatRateintegerrequired
computedAtdate-timerequired

Responses

202Success
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)
422Validation failed
429Rate limited for this API key and class; wait Retry-After seconds
otherError (RFC 9457 problem details)