Skip to main content
Use POST /emails/batch when your application needs to submit multiple independent emails in one HTTP request. A batch can contain between 1 and 50 messages.

Send a batch

The preferred request shape is a top-level JSON array:
For compatibility, Dugble also accepts an object containing messages:

Response ordering

A successful request returns 202 Accepted. Each item in data corresponds to the message at the same zero-based index in the request.
Store the returned IDs in the same order as the request items so each application record remains associated with the correct Dugble message.

Atomic acceptance

Dugble validates every message before committing the batch. The messages and their durable delivery jobs are then written in one transaction. If validation fails or the transaction cannot complete, none of the messages in the batch are committed.
Atomic acceptance does not mean atomic delivery. After the batch is accepted, each email has its own delivery lifecycle and can be delivered, delayed, bounced, rejected, or failed independently.

Limitations

  • A batch can contain between 1 and 50 emails.
  • Attachments are not supported in batch email requests.
  • Each email must independently satisfy the normal send validation rules.
  • Each email may be immediate or have its own scheduled_at value.
  • The Idempotency-Key applies to the complete batch request.
  • The combined validated batch payload is limited to 10 MiB.
For emails with attachments, use POST /emails for each message instead.