← Back to API Reference

POST /emails/batch

Send Batch Emails

Send multiple emails in one request.

Request (cURL)

curl -X POST "http://localhost:8080/v1/emails/batch" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "emails": [
    {
      "from": "no-reply@mail.example.com",
      "to": [
        "a@example.com"
      ],
      "subject": "Order update",
      "text": "Message A"
    },
    {
      "from": "no-reply@mail.example.com",
      "to": [
        "b@example.com"
      ],
      "subject": "Order update",
      "text": "Message B"
    }
  ]
}'

Response Example

{
  "data": [
    {
      "id": "em_123"
    },
    {
      "id": "em_124"
    }
  ]
}

Request Body Example

{
  "emails": [
    {
      "from": "no-reply@mail.example.com",
      "to": [
        "a@example.com"
      ],
      "subject": "Order update",
      "text": "Message A"
    },
    {
      "from": "no-reply@mail.example.com",
      "to": [
        "b@example.com"
      ],
      "subject": "Order update",
      "text": "Message B"
    }
  ]
}