Download OpenAPI specification:
MainBrainer Email API for public
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.
This endpoint is used to send a single email to a single recipient.
object (Recipients) Target recipient for the email sending. | |
required | object (EmailAddress) Sender details to help the email recipients identify who sent them the email. |
required | object (EmailAddress) Sender details to help the email recipients identify who sent them the email. |
subject required | string The text that you would like to appear in the email's subject field. |
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 |
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 |
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. |
{- "recipient": {
- "to": "sink@mainbrainer.com",
- "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"
}
{- "queueId": "string",
- "QueuedTimestamp": 0
}
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.
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. | |
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. |
{- "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"
}
]
}
]
}
{- "queueId": "string",
- "QueuedTimestamp": 0
}
This endpoint is used to trigger email sendings on the basis of pre-saved email trigger templates. Email trigger templates allow you to save all the details necessary to trigger template
an email sending as a template. These templates contain all the email sending details like the Sender name, the Sender email, the email subject and preheader texts, the email campaign that you wish to send, etc.
The emails can be sent immediately or can be scheduled for delivery at a later date and time.
predefinedTemplateId required | string The template ID of the email trigger template saved on MainBrainer. The Email sending details are fetched as per the details saved under this specified |
listId | Array of strings or null <uuid> [ items <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. |
scheduleDateTime | string or null <date-time> The scheduled date and time for the email sending in RFC3339 format (Y-m-d TH:i:sP). |
Array of objects or null (Recipients) Target recipient for the email sending. | |
webHookUrl | string or null The webhook URL where you want to receive delivery status updates for the email being sent. |
{- "predefinedTemplateId": "string",
- "listId": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
], - "scheduleDateTime": "2019-08-24T14:15:22Z",
- "recipients": [
- {
- "to": "sink@mainbrainer.com",
- "personalizationSubstitutionTags": [
- {
- "tagName": "string",
- "tagValue": "string"
}
]
}
], - "webHookUrl": "string"
}
{- "queueId": "string",
- "QueuedTimestamp": 0
}
Use this endpoint to retrieve the delivery status updates for the sent Email(s) in an easily parsable JSON format. The response will include the following delivery statuses as per the latest status of the sent Email:
id required | string <uuid> The queueId value received as response from the endpoints Email/Send Batch, Email/Single send, and Predefined Template SMS Send. |
{- "Id": "string",
- "Status": 0,
- "StatusText": "string",
- "StatusFailedReason": "string",
- "Details": [
- {
- "Total": 0,
- "Queued": 0,
- "Submitted": 0,
- "Delivered": 0,
- "Failed": 0
}
]
}