Kindly use the drop down option of code box to toggle between EU and non EU region API end point & sample code information
Send Email API allows you to send emails to your recipients using your sending domain. Each API call will enable you to send an email to single or multiple recipients.
Email API processes your requests, generates emails using the values defined in the API request and sends the emails to the recipients.
The nucleus of the Send Email API is the personalizations
object. The way you use the personalizations
object would give you the flexibility to modify
- the number of recipients who would receive the emails
- the subject of the mail
- the content of the mail
- the recipients marked as a copy in Cc or Bcc.
The settings
object allows you to configure the engagement tracking, scheduling information, global bcc and other advance control of your email delivery.
What is personalization?
You can use Send Email API to send a common content to multiple recipients, and personalizations
aims to enable you to substitute few elements of your common content and personalize the email for recipients enlisted in a single personalization object.
With each personalization object, you can define a different set of recipients and modify the content with distinct values passed in attributes object.
Personalization enables you to send a unique email to each recipient set, derived from a shared template or content.
What are tags?
tags
is a highly useful parameter which, when judiciously used, helps you to distinguish your emails in unique groups/segments.
If you are going to use Email API to send different type of emails, It makes sense to segment your emails and analyze the delivery & engagement performance for each segment.
For instance - If you are sending signup confirmation and festive season offers through Email API, tags
enable you to segregate those emails in two categories and provide you with the tag wise performance reports.
Passing Priority flag
Priority Flag (parameter name : priorityflag) allows the user to assing a sending priority to their mails. If the priority flag is passed in the Send Mail API request, delivery will happen as per the assigned priority. Following are the supported values -
- 1 - OTP and Transactional mails
- 2 - Triggered mails
- 3 - Promotional mails
Note - In case no priority flag is passed, the delivery will happen as per the priority assigned to your account or subaccount used.
Mail Body Compression
Mail body compression works by setting up a JSON payload as defined on this page, then compressing it with gzip. This allows the user to save data out cost by reducing the size of the request.
To use mail body compression:
Add a Content-Encoding header, with a value of gzip.
Content-Encoding: gzip