/emails/batchSend a batch of emails
Accepts between one and 100 emails.
Authentication
Bearer authentication is required for this operation.
Headers
Idempotency-KeystringOptional replay-protection key.
Request body
emailsrequiredarrayBetween one and 100 outbound email requests.
attachmentsarrayBase64-encoded attachments.
contentrequiredstringBase64-encoded attachment bytes.
content_typestringAttachment media type.
filenamerequiredstringAttachment filename.
bccstring | arrayBlind-carbon-copy address or addresses. Example: "hello@example.com".
Option 1stringAn email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).
Option 2arrayOne permitted response shape.
ccstring | arrayCarbon-copy address or addresses. Example: "hello@example.com".
Option 1stringAn email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).
Option 2arrayOne permitted response shape.
fromrequiredstringVerified sender email address. Example: "hello@example.com".
htmlstringHTML email content.
reply_tostring | arrayReply-to address or addresses. Example: "hello@example.com".
Option 1stringAn email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).
Option 2arrayOne permitted response shape.
subjectrequiredstringEmail subject.
tagsarrayUp to 20 email tags.
namerequiredstringTag name.
valuerequiredstringTag value.
textstringPlain-text email content.
torequiredstring | arrayOne recipient address or an array of recipient addresses. Example: "hello@example.com".
Option 1stringAn email address, either bare (`hello@acme.com`) or with a display name (`Acme <hello@acme.com>`).
Option 2arrayOne permitted response shape.
Request examples
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.
Option 1objectOne permitted response shape.
datarequiredarrayAccepted email identifiers.
idrequiredstringAccepted email identifier. Example: "msg_01j0example".
Option 2objectOne permitted response shape.
datarequiredarrayReplayed email identifiers.
idrequiredstringReplayed email identifier. Example: "msg_01j0example".
idempotent_replayrequiredbooleanWhether this response replayed an idempotent request. Values: true.
{
"emails": [
{
"from": "sender@acme.com",
"subject": "Welcome",
"text": "Hello",
"to": "hello@example.com"
}
]
}400 response
Request body was not valid JSON.
errorsarrayDetailed validation issues. Absent only for the historical 401 API-key envelope.
coderequiredstringZod validation issue code. Example: "invalid_format".
messagerequiredstringHuman-readable validation failure. Example: "Invalid email address".
pathrequiredstringDot-separated location of the invalid value. Example: "from".
messagerequiredstringHuman-readable error message. Example: "Request validation failed.".
namerequiredstringMachine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".
{
"emails": [
{
"from": "sender@acme.com",
"subject": "Welcome",
"text": "Hello",
"to": "hello@example.com"
}
]
}401 response
Invalid API key.
errorsarrayDetailed validation issues. Absent only for the historical 401 API-key envelope.
coderequiredstringZod validation issue code. Example: "invalid_format".
messagerequiredstringHuman-readable validation failure. Example: "Invalid email address".
pathrequiredstringDot-separated location of the invalid value. Example: "from".
messagerequiredstringHuman-readable error message. Example: "Request validation failed.".
namerequiredstringMachine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".
{
"emails": [
{
"from": "sender@acme.com",
"subject": "Welcome",
"text": "Hello",
"to": "hello@example.com"
}
]
}422 response
Request validation failed.
errorsarrayDetailed validation issues. Absent only for the historical 401 API-key envelope.
coderequiredstringZod validation issue code. Example: "invalid_format".
messagerequiredstringHuman-readable validation failure. Example: "Invalid email address".
pathrequiredstringDot-separated location of the invalid value. Example: "from".
messagerequiredstringHuman-readable error message. Example: "Request validation failed.".
namerequiredstringMachine-readable error category. Values: "validation_error", "application_error", "not_found". Example: "validation_error".
{
"emails": [
{
"from": "sender@acme.com",
"subject": "Welcome",
"text": "Hello",
"to": "hello@example.com"
}
]
}