Sending
Send emails in a batch
Up to 100 emails in one request, accepted together or not at all.
Send an array of email objects with the same fields as a single send, except attachments and scheduled_at. The whole batch is validated first. If any email is invalid, the request fails and nothing is sent.
POST
/emails/batchcurl -X POST https://api.chebu.io/emails/batch \
-H "Authorization: Bearer $CHEBU_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"from": "Northwind <[email protected]>",
"to": ["[email protected]"],
"subject": "Your receipt #1042",
"html": "<p>Thanks for your order.</p>"
},
{
"from": "Northwind <[email protected]>",
"to": ["[email protected]"],
"subject": "Your receipt #1043",
"html": "<p>Thanks for your order.</p>"
}
]'JSON
{
"data": [
{ "id": "4ef9a417-02e9-4d39-ad75-9611e0fcc33c" },
{ "id": "a3b9f2c1-6d4e-4b8a-9f0e-1c2d3e4f5a6b" }
]
}- Up to 100 emails per request, and up to 20 MB of JSON.
- The IDs come back in the same order as the emails you sent.
- Each email counts as one send toward your monthly allowance.
- Add an
Idempotency-Keyheader so a retried batch isn't sent twice.