Skip to main content
POST
/
v1
/
emails
/
batch
Send a batch of emails
curl --request POST \
  --url https://api.mail.gorillaa.one/v1/emails/batch \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
[
  {
    "from": "[email protected]",
    "to": [
      "[email protected]"
    ],
    "subject": "<string>",
    "cc": [
      "[email protected]"
    ],
    "bcc": [
      "[email protected]"
    ],
    "replyTo": "[email protected]",
    "html": "<string>",
    "text": "<string>",
    "headers": {},
    "tags": [
      "<string>"
    ],
    "scheduledAt": "2023-11-07T05:31:56Z",
    "idempotencyKey": "<string>",
    "attachments": [
      {
        "filename": "<string>",
        "contentType": "application/pdf",
        "content": "aSDinaTvuI8gbWludGxpZnk=",
        "contentId": "<string>"
      }
    ],
    "metadata": {}
  }
]
'
{
  "data": {
    "data": [
      {
        "index": 123,
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "status": "queued",
        "error": "<string>",
        "code": "<string>"
      }
    ],
    "summary": {
      "total": 123,
      "successful": 123,
      "failed": 123
    }
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your Gorillaa Mail API key as a Bearer token.

Example: Authorization: Bearer grl_live_xxxxxxxxxxxx

Keys prefixed grl_test_ operate in test mode with reduced limits.

Body

application/json
Required array length: 1 - 100 elements
from
required

An email address — either a plain string or an object with name

to
(string<email> | object)[]
required

Primary recipients (1–50)

Required array length: 1 - 50 elements

An email address — either a plain string or an object with name

subject
string
required
Required string length: 1 - 998
cc
(string<email> | object)[]
Maximum array length: 50

An email address — either a plain string or an object with name

bcc
(string<email> | object)[]
Maximum array length: 50

An email address — either a plain string or an object with name

replyTo

An email address — either a plain string or an object with name

html
string

HTML body (max 5MB). Either html or text is required.

Maximum string length: 5242880
text
string

Plain text body (max 1MB). Either html or text is required.

Maximum string length: 1048576
headers
object

Custom email headers

tags
string[]

Tags for categorization (max 10)

Maximum array length: 10
Maximum string length: 100
scheduledAt
string<date-time>

Schedule delivery for a future time (must be ≥1 minute in the future)

idempotencyKey
string

Client-generated idempotency key

Maximum string length: 255
attachments
object[]

File attachments (max 10)

Maximum array length: 10
metadata
object

Arbitrary metadata stored with the email

Response

Batch accepted

data
object
required