Batch Send

Send up to 100 emails in a single API call with per-message validation and partial success support.

The batch endpoint queues multiple emails in a single request. Each message is validated independently — invalid messages are skipped and reported in the response without affecting valid ones.

Key features:

• Up to 100 messages per batch
• Per-message validation and error reporting
• Template resolution per message
• Idempotency support via X-Idempotency-Key header
• Rate limits are consumed atomically for the batch size
• Scheduled emails (scheduledFor) are NOT supported in batch mode
POST/v1/batchAPI Key

Send a batch of up to 100 emails. Each message is validated independently. Returns per-message results with success/failure status.

ParameterTypeInDescription
messagesrequiredarraybodyArray of email objects (1-100). Each object has the same fields as POST /v1/send (from, to, subject, html, text, templateId, variables, headers, metadata, tags).

Request

bash
{
  "messages": [
    {
      "from": "hello@yourdomain.com",
      "to": ["user1@example.com"],
      "subject": "Welcome!",
      "html": "<h1>Hello User 1</h1>"
    },
    {
      "from": "hello@yourdomain.com",
      "to": ["user2@example.com"],
      "subject": "Welcome!",
      "templateId": "welcome-template",
      "variables": { "name": "User 2" }
    }
  ]
}

Response

json
{
  "success": true,
  "results": [
    { "index": 0, "success": true, "jobId": "abc123" },
    { "index": 1, "success": true, "jobId": "def456" }
  ],
  "total": 2,
  "queued": 2,
  "failed": 0
}