Send up to 500 different messages in one request
post/mail/send/batch
Send up to 500 different messages in one request. Each item is accepted or rejected on its own; the answer has one result per item and a batchId that cancels the whole batch while it waits.
Before you call
- Credential
Authorization: Bearer $KEY- Scope
campaigns:write- Mcp
rivier_campaign_mail_send_batch- Graphql
Mutation.campaignsMailBatchSendCreate- Sdk
mail.sendBatch- Cli
mail send-batch
Request bodyapplication/json, required
- messageslist of objectrequired
- tostringrequiredAt most 320 characters.
- fromstringDefaults to the project's sending address; must be on its sending domain At most 320 characters.
- fromNamestringAt most 120 characters.
- replyTostringAt most 320 characters.
- subjectstringRequired unless the template has one. May use {{variables}} At most 998 characters.
- htmlstringAt most 1000000 characters.
- textstringDefaults to the html as plain text At most 1000000 characters.
- templatestringA template name or id from the template library At most 120 characters.
- dataobjectValues the template or the message reads: {{name}}, {{#if plan == "pro"}}, {{#each items}}
- groupstringUnsubscribe group; adds the unsubscribe link and one-click header, and honours the person's choice At most 40 characters.
- tagslist of string
- headersobjectExtra headers (X-...); headers the platform sets are refused
- sendAtstringISO 8601 time, at most 30 days ahead; default now At most 40 characters.
- trackOpensboolean
- trackClicksboolean
- attachmentslist of objectUp to 10 files, 5 MB together; programs and scripts are refused
- filenamestringrequiredThe name the recipient sees, such as invite.ics At most 200 characters.
- contentTypestringDefaults from the file name; text/calendar for an invitation At most 120 characters.
- contentstringrequiredThe file's bytes in base64 At most 7000000 characters.
- filenamestringrequired
- tostringrequired
- sandboxboolean
- idempotencyKeystringAt most 200 characters.
Responses
- 202application/jsonSuccess
- 400application/jsonThe request was malformed
- errorstringrequired
- messagestring
- 401application/jsonNo valid credential
- errorstringrequired
- messagestring
- 403application/jsonThe credential lacks the scope, origin or address
- errorstringrequired
- messagestring
- 429application/jsonOver the key's rate limit; see Retry-After
- errorstringrequired
- messagestring