Send Single Email

Send Email API

This endpoint is especially useful for sending recipient-specific one-time alert emails or updates. 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.

SecurityBearer
Request
Request Body schema:

This endpoint is used to send a single email to a single recipient.

object (Recipients)

Target recipient for the email sending.

to
required
string
Default: "[email protected]"

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
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.

Responses
202

Success

400

Bad Request

401

Unauthorized

409

Conflict

422

Client Error

500

Server Error

post/email/single
Request samples
{
  • "recipient": {
    • "personalizationSubstitutionTags": [
      • {
        • "tagName": "string",
        • "tagValue": "string"
        }
      ]
    },
  • "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"
}
Response samples
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}