Send bulk messages
Queue one templated email message for multiple recipients.
This endpoint requires an existing Delivery account, a configured sending domain, and a Send API bearer token created for that Delivery account.
Bulk messages use Handlebars-style template variables, written as {{variable_name}}, inside the base message fields such as subject, text_body, html_body, headers, metadata, tags, and attachment filenames or content IDs. For each item in recipients, the API renders a dedicated message using that recipient's substitutions object. The special {{email}} variable is always available and contains the recipient email address. By default, every recipient must provide all variables used by the template; set options.strict_substitutions to false if missing variables should render as empty values instead.
/v1/send/bulkAuthorization
ApiBearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Base message template for /v1/send/bulk. The to field is not allowed;
the recipient is populated from each recipients[].email value.
At least one body among text_body or html_body is required.
Handlebars placeholders are supported in message fields. Address fields are rendered per recipient and normalized by the worker before final delivery.
Unknown message properties are accepted and ignored.
Single email address. Accepts an RFC 5322 mailbox string such as Sender Name <sender@example.com> or an object with address and optional name.
Email address.
Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.
Email address.
Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.
Email address.
Recipient list. Accepts one RFC 5322 mailbox string, a comma-separated RFC 5322 string, one address object, or an array of address strings/objects.
Email address.
Required when html_body is absent.
Required when text_body is absent.
Custom headers. Values can be string, number, boolean, or arrays of those primitive values.
Base64 encoded content.
byteDefaults to inline when content_id is provided; otherwise defaults to attachment.
attachmentValues attachment | inlineRequired for inline attachments; if provided, disposition must be inline. Used as CID.
Single email address. Accepts an RFC 5322 mailbox string such as Sender Name <sender@example.com> or an object with address and optional name.
Email address.
Controls how bulk message templates are rendered for each recipient. Unknown options are accepted and ignored.
When true, every recipient must provide all variables used by the message template. When false, missing variables render as empty values.
trueResponse Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://delivery.qboxmail.com/v1/send/bulk" \ -H "Authorization: Bearer <SEND_API_TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "message": { "from": "sender@example.com", "subject": "Welcome {{first_name}}", "html_body": "<p>Hello {{first_name}}</p>" }, "recipients": [ { "email": "john@example.com", "substitutions": { "first_name": "John" } } ] }'{
"error_code": 0,
"message": "OK",
"request_id": "string",
"queued_messages": 0,
"messages": [
{
"error_code": 0,
"message": "OK",
"request_id": "string",
"message_id": "string",
"submitted_at": "2019-08-24T14:15:22Z",
"to": "string"
}
],
"suppression_summary": {
"status": "checked",
"checked_recipients": 0,
"accepted_recipients": 0,
"suppressed_recipients": 0,
"suppressed_emails": [
"user@example.com"
]
}
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}{
"error_code": 0,
"message": "string",
"error": "missing_send_payload",
"request_id": "string"
}