Send a batch of emails
POST/api/v1/email/batch
POST /email/batch
curl -X POST 'https://www.unitpost.com/api/v1/email/batch' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"emails": [
{
"from": "you@yourdomain.com",
"to": "a@example.com",
"subject": "Hi A",
"html": "<p>Hi A</p>"
},
{
"from": "you@yourdomain.com",
"to": "b@example.com",
"subject": "Hi B",
"html": "<p>Hi B</p>"
}
]
}'Response · 200
{
"object": "list",
"batch_id": "batch_123",
"status": "queued",
"scheduled_at": "2026-01-01T00:00:00.000Z",
"data": [
{
"id": "id_123"
}
],
"failed": [
{
"index": 0,
"error": "string"
}
]
}Send up to 100 transactional emails in a single request. Validation is all-or-nothing: if any item is invalid the whole batch is rejected and nothing is queued, so you never end up with a partial send. Pass an Idempotency-Key header to make retries safe — the same key replays the original result instead of re-sending. The response returns a batch_id; track the batch's per-status rollup with Retrieve a batch and stop the rest of it with Cancel a batch. To send one email, use Send or schedule an email. Requires the emails:send capability.
Response · 200 fields1 field
| Field | Type | Description |
|---|---|---|
idrequired | string | — |
200401403409422429