Send Predefined Email

Trigger Email sendings on the basis of pre-saved templates

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.

SecurityBearer
Request
Request Body schema:

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

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.

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.

Array
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
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/predefinedemail
Request samples
{
  • "predefinedTemplateId": "string",
  • "listId": [
    • "497f6eca-6276-4993-bfeb-53cbbbba6f08"
    ],
  • "scheduleDateTime": "2019-08-24T14:15:22Z",
  • "recipients": [
    • {
      • "personalizationSubstitutionTags": [
        • {
          • "tagName": "string",
          • "tagValue": "string"
          }
        ]
      }
    ],
  • "webHookUrl": "string"
}
Response samples
{
  • "queueId": "string",
  • "QueuedTimestamp": 0
}