Rivier/ Reference/ campaigns

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
    • tostringrequired
      At most 320 characters.
    • fromstring
      Defaults to the project's sending address; must be on its sending domain At most 320 characters.
    • fromNamestring
      At most 120 characters.
    • replyTostring
      At most 320 characters.
    • subjectstring
      Required unless the template has one. May use {{variables}} At most 998 characters.
    • htmlstring
      At most 1000000 characters.
    • textstring
      Defaults to the html as plain text At most 1000000 characters.
    • templatestring
      A template name or id from the template library At most 120 characters.
    • dataobject
      Values the template or the message reads: {{name}}, {{#if plan == "pro"}}, {{#each items}}
    • groupstring
      Unsubscribe group; adds the unsubscribe link and one-click header, and honours the person's choice At most 40 characters.
    • tagslist of string
    • headersobject
      Extra headers (X-...); headers the platform sets are refused
    • sendAtstring
      ISO 8601 time, at most 30 days ahead; default now At most 40 characters.
    • trackOpensboolean
    • trackClicksboolean
    • attachmentslist of object
      Up to 10 files, 5 MB together; programs and scripts are refused
      • filenamestringrequired
        The name the recipient sees, such as invite.ics At most 200 characters.
      • contentTypestring
        Defaults from the file name; text/calendar for an invitation At most 120 characters.
      • contentstringrequired
        The file's bytes in base64 At most 7000000 characters.
  • sandboxboolean
  • idempotencyKeystring
    At most 200 characters.

Responses

  • 202application/json
    Success
    • 400application/json
      The request was malformed
      • errorstringrequired
      • messagestring
    • 401application/json
      No valid credential
      • errorstringrequired
      • messagestring
    • 403application/json
      The credential lacks the scope, origin or address
      • errorstringrequired
      • messagestring
    • 429application/json
      Over the key's rate limit; see Retry-After
      • errorstringrequired
      • messagestring

    This page as Markdown