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
| Parameter | Type | Required | Description |
|---|---|---|---|
recipients | array | Yes | Array of recipient objects [{to, variables}]. |
from | string | No | Sender address. Must be verified. Defaults to no-reply@sendapi.co. |
subject | string | Yes | Email subject line. Supports template variables: . |
template_id | string | No* | ID of a saved template. Use this OR html/text. |
html | string | No* | HTML body of the email. Supports substitution. |
text | string | No | Plain-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.