Send one template to many recipients
Fans one stored template out to up to 1,000 recipients, creating one letter per recipient rendered with that recipient's templateData.
Fans one stored template out to up to 1,000 recipients, creating one letter per recipient rendered with that recipient's templateData. The whole request is validated up front — one malformed address, an unsupported to.country, or an unknown templateId (404) rejects the batch with nothing created. from, print, delivery, paymentSlip, autoSend, notifications, and metadata are shared by every member letter; only the address and templateData vary per recipient. Returns { id, total, status: "queued" } immediately, then rendering, printing, and posting proceed asynchronously — each member follows the normal lifecycle and emits letter.status_changed webhook events carrying its batchId. Each letter is priced and billed individually; list the members with GET /v1/letters?batchId=... and watch the rollup on GET /v1/letters/batches/{id}. Requires the letters:send scope.
Scope: letters:send. Send the API key as a bearer token; Scopes lists what each one reaches.
Request
Body
Required, application/json: CreateLetterBatchRequest.
| Field | Type | Required | Description |
|---|---|---|---|
templateId | string | yes | The stored letter template rendered once per recipient. |
recipients | array of BatchRecipient | yes | (min items 1, max items 1000) |
from | PostalAddress or null | no | |
print | LetterPrintOptions | no | |
delivery | LetterDelivery | no | |
paymentSlip | "qr", "sepaDe", "sepaAt" or null | no | Optional payment-slip overlay applied to every letter. |
autoSend | boolean | no | (default true) |
notifications | boolean | no | (default true) |
metadata | object | no |
Response
200 Success. Body: application/json, LetterBatchCreateResponse.
| Field | Type | Required | Description |
|---|---|---|---|
object | "letter_batch" | yes | |
id | string | yes | |
total | integer | yes | Number of letters created (one per recipient). |
status | string | yes | The batch status; queued on create. |
Errors
Every error has the same body, {"error": {"type", "code", "message", "param"}}; branch on code. Errors lists every code.
| Status | Meaning |
|---|---|
400 | The request is malformed or a value is invalid (invalid_request, invalid_domain, idempotency_key_mismatch). |
401 | The API key is missing or invalid. |
403 | The key lacks the scope this endpoint needs (scope_missing) or may not do this (not_permitted). |
404 | No such resource in this account (resource_not_found). |
422 | The request is well-formed but a field failed validation (validation_failed). |
429 | Rate limit, plan limit, budget or spend cap reached (rate_limited, plan_limit_reached, budget_exceeded, spend_cap_reached). |
500 | An unexpected error; retry with backoff, then contact support (internal_error). |
Render a template proof with a sample recipient
Renders the template with a fixed sample recipient and returns the composited proof as pdfBase64 — nothing is created, printed, or billed.
Get a batch with its live per-status rollup
Returns the letter_batch with a live rollup of its member letters: statusCounts maps each letter status to a count, and completed counts letters in a terminal state (delivered, undeliverable, canceled, or failed).