Send batch
POST /emails/batch
Send up to 100 emails in one HTTP request. Each email is queued individually; the response includes one id per email in submission order.
Body parameters
Section titled “Body parameters”| Field | Type | Required | Description |
|---|---|---|---|
emails | object[] | yes | Array of email objects (max 100). |
Example
Section titled “Example”curl -X POST https://mail.3ava.com/api/emails/batch \ -H "Authorization: Bearer am_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "emails": [ { "from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello A", "html": "<p>Hi A</p>" }, { "from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello B", "html": "<p>Hi B</p>" } ] }'import requests
r = requests.post( "https://mail.3ava.com/api/emails/batch", headers={"Authorization": "Bearer am_YOUR_KEY"}, json={ "emails": [ {"from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello A", "html": "<p>Hi A</p>"}, {"from": "Acme <[email protected]>", "to": ["[email protected]"], "subject": "Hello B", "html": "<p>Hi B</p>"}, ] },)Response
Section titled “Response”{ "data": [ { "id": "a1b2...", "status": "queued" }, { "id": "c3d4...", "status": "queued" } ]}If any individual email fails validation, the whole batch is rejected with 422. Either all 100 are queued, or none are.