Send a batch
Queue up to 100 emails in one request, with a result for each.
/v1/emails/batchAPI keyThe body is a JSON array of emails. Each item is checked and queued on its own, exactly like Send an email, so one bad item doesn't stop the others. The response lists one result per item, in the same order as the request.
Add ?dryRun=true to validate every item and see what would be sent, without sending anything.
Query parameters
true or 1 to validate only. Each item is checked (sender, recipients, suppressions, headers, template, attachments, size) and nothing is stored, queued or counted against limits.
Headers
One key for the whole batch. Flaresend stores it per item as <key>:<index>, so item 0 of batch key import-7 gets import-7:0. An item with its own idempotencyKey keeps its own key instead. Resending the same batch with the same key returns the original emails with idempotent: true and sends nothing again. See Idempotency.
Body
An array of 1 to 100 email objects. Each object takes the same fields as the body of Send an email: from, to, cc, bcc, replyTo, subject, html, text, template, data, headers, tags, attachments, scheduledAt, trackOpens, trackClicks and idempotencyKey.
Response
Status 200, whatever happened to the individual items. Check each item.
One entry per request item, in the same order.
Show result propertiesHide result properties
The email ID.
The same values as a single send.
true when the item replayed an earlier send with the same key.
Dry run response
With ?dryRun=true the body is { "dryRun": true, "data": [...] }, and each item is either { "ok": true, from, to, cc, bcc, subject } with the resolved sender, the deduplicated recipient lists and the final subject (after rendering the template), or { "error": … }. A dry run does not check idempotency keys or rate limits.
Errors
These fail the whole request. Errors for single items come back inside data.
| Status | Code | When |
|---|---|---|
| 400 | missing_body | No body. |
| 400 | invalid_body | The body isn't a JSON array, is empty, or has more than 100 items. |