Simplifyd Cloud
SmailAPI ReferenceEmailsSend Batch Emails

Send Batch Emails

Send up to 1,000 emails in a single API call.

POST /api/v1/emails/batch

Sends up to 1,000 emails in one request. Each email is processed independently — failures for individual emails do not abort the batch. Authenticate with an X-API-Key header.

Request body

FieldTypeRequiredDescription
emailsSendEmailRequest[]YesArray of email objects (max 1,000)

Each object in emails has the same fields as Send Email.

Response

Returns 200 OK with a emails array and a count:

FieldTypeDescription
emailsEmailSend[]Array of queued email records
countnumberTotal number of emails in the batch
{
  "emails": [
    {
      "id": "em_01hx...",
      "status": "queued",
      "from": "newsletter@yourdomain.com",
      "to": "alice@example.com",
      "subject": "Our April newsletter",
      "created_at": "2024-04-01T09:00:00Z"
    },
    {
      "id": "em_01hy...",
      "status": "queued",
      "from": "newsletter@yourdomain.com",
      "to": "bob@example.com",
      "subject": "Our April newsletter",
      "created_at": "2024-04-01T09:00:00Z"
    }
  ],
  "count": 2
}

Code examples

curl https://api.smail.dev/api/v1/emails/batch \
  -H "X-API-Key: sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      {
        "from": "newsletter@yourdomain.com",
        "to": ["alice@example.com"],
        "subject": "Our April newsletter",
        "html": "<p>Hello Alice!</p>",
        "type": "marketing"
      },
      {
        "from": "newsletter@yourdomain.com",
        "to": ["bob@example.com"],
        "subject": "Our April newsletter",
        "html": "<p>Hello Bob!</p>",
        "type": "marketing"
      }
    ]
  }'
const result = await smail.emails.batch([
  {
    from: "newsletter@yourdomain.com",
    to: ["alice@example.com"],
    subject: "Our April newsletter",
    html: "<p>Hello Alice!</p>",
    type: "marketing",
  },
  {
    from: "newsletter@yourdomain.com",
    to: ["bob@example.com"],
    subject: "Our April newsletter",
    html: "<p>Hello Bob!</p>",
    type: "marketing",
  },
]);
console.log(`Sent ${result.count} emails`);
result, err := client.Emails.Batch(ctx, []smail.SendEmailRequest{
    {
        From:    "newsletter@yourdomain.com",
        To:      []string{"alice@example.com"},
        Subject: "Our April newsletter",
        HTML:    "<p>Hello Alice!</p>",
        Type:    "marketing",
    },
    {
        From:    "newsletter@yourdomain.com",
        To:      []string{"bob@example.com"},
        Subject: "Our April newsletter",
        HTML:    "<p>Hello Bob!</p>",
        Type:    "marketing",
    },
})

Error responses

StatusErrorDescription
401unauthorizedMissing or invalid API key
400invalid requestBatch exceeds 1,000 emails or missing required fields