boundry.
RegionSydney, Australia
Documentation/Send a batch of emails
POST/emails/batch

Send a batch of emails

Accepts between one and 100 emails.

Authentication

Bearer authentication is required for this operation.

Headers

NameTypeDescription
Idempotency-Keystring

Optional replay-protection key.

Request body

FieldTypeDescription
emailsrequiredarray

Between one and 100 outbound email requests.

attachmentsarray

Base64-encoded attachments.

contentrequiredstring

Base64-encoded attachment bytes.

content_typestring

Attachment media type.

filenamerequiredstring

Attachment filename.

bccstring | array

Blind-carbon-copy address or addresses. Example: "hello@example.com".

Option 1string

An email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).

Option 2array

One permitted response shape.

ccstring | array

Carbon-copy address or addresses. Example: "hello@example.com".

Option 1string

An email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).

Option 2array

One permitted response shape.

fromrequiredstring

Verified sender email address. Example: "hello@example.com".

htmlstring

HTML email content.

reply_tostring | array

Reply-to address or addresses. Example: "hello@example.com".

Option 1string

An email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).

Option 2array

One permitted response shape.

subjectrequiredstring

Email subject.

tagsarray

Up to 20 email tags.

namerequiredstring

Tag name.

valuerequiredstring

Tag value.

textstring

Plain-text email content.

torequiredstring | array

One recipient address or an array of recipient addresses. Example: "hello@example.com".

Option 1string

An email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).

Option 2array

One permitted response shape.

Request examples

request.sh
bash
curl --request POST 'https://api.au.boundry.dev/emails/batch' \
+  -H 'Authorization: Bearer $BOUNDRY_API_KEY' \
+  -H 'Idempotency-Key: string' \
+  -H 'Content-Type: application/json' \
+  --data '{"emails":[{"from":"sender@acme.com","subject":"Welcome","text":"Hello","to":"hello@example.com"}]}'

200 response

Identifiers for accepted messages.

FieldTypeDescription
Option 1object

One permitted response shape.

datarequiredarray

Accepted email identifiers.

idrequiredstring

Accepted email identifier. Example: "msg_01j0example".

Option 2object

One permitted response shape.

datarequiredarray

Replayed email identifiers.

idrequiredstring

Replayed email identifier. Example: "msg_01j0example".

idempotent_replayrequiredboolean

Whether this response replayed an idempotent request. Values: true.

response.jsonExample response
application/json
{
  "emails": [
    {
      "from": "sender@acme.com",
      "subject": "Welcome",
      "text": "Hello",
      "to": "hello@example.com"
    }
  ]
}

400 response

Request body was not valid JSON.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "emails": [
    {
      "from": "sender@acme.com",
      "subject": "Welcome",
      "text": "Hello",
      "to": "hello@example.com"
    }
  ]
}

401 response

Invalid API key.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "emails": [
    {
      "from": "sender@acme.com",
      "subject": "Welcome",
      "text": "Hello",
      "to": "hello@example.com"
    }
  ]
}

422 response

Request validation failed.

FieldTypeDescription
errorsarray

Detailed validation issues. Absent only for the historical 401 API-key envelope.

coderequiredstring

Zod validation issue code. Example: "invalid_format".

messagerequiredstring

Human-readable validation failure. Example: "Invalid email address".

pathrequiredstring

Dot-separated location of the invalid value. Example: "from".

messagerequiredstring

Human-readable error message. Example: "Request validation failed.".

namerequiredstring

Machine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".

response.jsonExample response
application/json
{
  "emails": [
    {
      "from": "sender@acme.com",
      "subject": "Welcome",
      "text": "Hello",
      "to": "hello@example.com"
    }
  ]
}