Send Batch Email

Send an Email to a Batch of Contacts

This endpoint is used to send an email to multiple recipients in one go and is especially useful for sending out email marketing campaigns like promotions for upcoming sales, special discount coupons, or event promotions, etc., to your contact lists.

Note: that this API uses the promotional route for sending the emails. Kindly ensure that your emails are optimally designed to protect your sender reputation.

The emails can be sent immediately or can be scheduled for delivery at a later date and time.

Request
Security:
Bearer
Request Body schema:

This endpoint is used to send an email to multiple recipients in one go.

object (BatchSendingDetails)

Details to define the email you wish to send, and the list of contacts to which you wish to send the email.

listId
Array of strings or null <uuid>

List ID of the CRM contact list to which you wish to send the email. If you wish to send the email to multiple contact lists, pass the relevant List IDs as an array.

required
object (EmailAddress)

Sender details to help the email recipients identify who sent them the email.

email
required
string

The email address you wish to display

displayName
string or null

The display name you wish to use for the specified email address

required
object (EmailAddress)

Sender details to help the email recipients identify who sent them the email.

email
required
string

The email address you wish to display

displayName
string or null

The display name you wish to use for the specified email address

subject
required
string

The text that you would like to appear in the email's subject field. Personalization Substitution Tags will work in the subject line to insert dynamic data for each recipient.

preHeaderText
string or null

The text you would like to appear in the email's preheader area, i.e., the area after the subject line. It is possible to personalize the preheader text using Personalization Substitution Tags

emailBody
string or null

If you are designing your email in HTML, encode it into Base 64 format and pass it as the parameter value.

scheduleDateTime
string or null <date-time>

The scheduled date and time for the email sending in RFC3339 format (Y-m-d TH:i:sP).

emailCampaignId
string or null <uuid>
Default: "00000000-0000-0000-0000-000000000000"

Email Campaign ID of the email you want to send. Email Campaign ID is the unique identifier for an email campaign created in your MainBrainer account.

webHookUrl
string or null

The webhook URL where you want to receive delivery status updates for the email being sent.

Array of objects or null (Recipients)

Details to define the email you wish to send, and the list of contacts to which you wish to send the email.

Array
to
required
string
Default: "sink@mainbrainer.com"

The email address at which you want to send the email.

Array of objects or null (PersonalizationSubstitutionTag)

Insert dynamic data at the time of Email sending, follow the pattern tagName:tagValue to substitute for the key/value pairs.

Array
tagName
string or null
tagValue
string or null
Responses
202

Success

400

Bad Request

401

Unauthorized

409

Conflict

422

Client Error

500

Server Error

post/email/batch
Request samples
{
  • "sendingDetails": {
    • "listId": [
      • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
      ],
    • "senderFrom": {
      • "email": "string",
      • "displayName": "string"
      },
    • "replyTo": {
      • "email": "string",
      • "displayName": "string"
      },
    • "subject": "string",
    • "preHeaderText": "string",
    • "emailBody": "string",
    • "scheduleDateTime": "2019-08-24T14:15:22Z",
    • "emailCampaignId": "00000000-0000-0000-0000-000000000000",
    • "webHookUrl": "string"
    },
  • "recipients": [
    • {
      • "to": "sink@mainbrainer.com",
      • "personalizationSubstitutionTags": [
        • {
          • "tagName": "string",
          • "tagValue": "string"
          }
        ]
      }
    ]
}
Response samples
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}