Docs/Batch Sending

Batch Sending

Send up to 500 emails in a single API call. Supports both template-based sending with per-recipient variables, and direct mode with individual email content.

POST/api/send/batch

Two Sending Modes

The batch endpoint supports two mutually exclusive modes:

Template Mode

Provide templateId + recipients array. Each recipient can have unique variables.

Direct Mode

Provide an emails array where each item has its own subject and content.

Template Mode

ParameterTypeRequiredDescription
templateIdstringRequiredID of the template to use
recipientsarrayRequiredArray of recipient objects (max 500)
recipients[].tostringRequiredRecipient email address
recipients[].variablesobjectOptionalTemplate variables for this recipient
Template mode request
curl -X POST https://fwd.sarthak.online/api/send/batch \
  -H "x-api-key: fwd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "tmpl_abc123",
    "recipients": [
      {
        "to": "alice@example.com",
        "variables": { "name": "Alice", "plan": "Pro" }
      },
      {
        "to": "bob@example.com",
        "variables": { "name": "Bob", "plan": "Free" }
      }
    ]
  }'

Direct Mode

ParameterTypeRequiredDescription
emailsarrayRequiredArray of email objects (max 500)
emails[].tostringRequiredRecipient email address
emails[].subjectstringRequiredEmail subject line
emails[].htmlstringOptionalHTML content (html or text required)
emails[].textstringOptionalPlain text content
Direct mode request
curl -X POST https://fwd.sarthak.online/api/send/batch \
  -H "x-api-key: fwd_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "emails": [
      {
        "to": "alice@example.com",
        "subject": "Your invoice is ready",
        "html": "<p>Invoice #001 for Alice</p>"
      },
      {
        "to": "bob@example.com",
        "subject": "Your invoice is ready",
        "html": "<p>Invoice #002 for Bob</p>"
      }
    ]
  }'

Response

FieldTypeDescription
batchIdstringUnique batch identifier for tracking
statusstring"processing", "completed", "partial", or "failed"
messagestringHuman-readable status message
totalnumberTotal recipients submitted
queuednumberNumber of emails accepted for delivery
suppressednumberRecipients skipped (on suppression list)
duplicatesnumberDuplicate emails removed
errorsarrayArray of {index, to, error} for failed validations
rateLimitobject{limit, remaining} for your plan

Features

Built-in protections

Batch sending automatically deduplicates recipients, filters suppressed addresses, validates email formats, and respects your plan's monthly limit.

Link tracking

Links in batch emails are automatically replaced with tracked short URLs. Click data is available in the Analytics dashboard and via webhook events.