Skip to content

Bulk Email

POST /v1/email/send-bulk

Send an email to multiple recipients in a single API call. Each recipient can receive personalized content via per-recipient variable substitution. Bulk sends are queued and processed asynchronously.

Request Body

ParameterTypeRequiredDescription
recipientsarrayYesArray of recipient objects [{to, variables}].
fromstringNoSender address. Must be verified. Defaults to no-reply@sendapi.co.
subjectstringYesEmail subject line. Supports template variables: .
template_idstringNo*ID of a saved template. Use this OR html/text.
htmlstringNo*HTML body of the email. Supports substitution.
textstringNoPlain-text fallback body.
bash
curl -X POST https://sendapi.co/v1/email/send-bulk \
  -H "Authorization: Bearer sk_live_123456789" \
  -H "Content-Type: application/json" \
  -d '{
    "from": "updates@myapp.com",
    "subject": "Hello {{name}}, your report is ready",
    "recipients": [
      { "to": "alice@example.com", "variables": { "name": "Alice" } },
      { "to": "bob@example.com", "variables": { "name": "Bob" } }
    ],
    "html": "<h1>Hi {{name}}!</h1><p>Your weekly report is ready to view.</p>"
  }'
javascript
const batch = await client.email.sendBulk({
  from: 'updates@myapp.com',
  subject: 'Hello {{name}}, your report is ready',
  recipients: [
    { to: 'alice@example.com', variables: { name: 'Alice' } },
    { to: 'bob@example.com', variables: { name: 'Bob' } }
  ],
  html: '<h1>Hi {{name}}!</h1><p>Your weekly report is ready.</p>'
});

Response

json
{
  "batch_id": "batch_01H9...XQ",
  "status": "queued",
  "total": 2,
  "queued_at": "2026-03-09T14:30:00Z"
}

Unsubscribe Headers

Bulk email sends automatically include List-Unsubscribe headers to comply with Gmail and Yahoo bulk sender requirements (2024). Users who click unsubscribe are automatically added to your suppression list.

Released under the MIT License.