Emails
Use this API to send one-off messages such as welcome emails, password resets, and order confirmations. Requests are accepted immediately and queued into a priority delivery queue. Most requests are processed within 30 seconds.
Available Endpoints
The Email Model
The email model resembles a standard email but includes additional flags and custom data fields for merging into the provided HTML.
Properties
- Name
tostring- Description
The email address of the recipient.
- Name
fromstring- Description
The email address of the sender. Must be an author in your account.
- Name
subjectstring- Description
The subject of the email.
- Name
html_bodystring- Description
The HTML body of the email.
- Name
transactionalboolean- Description
trueorfalseflag if the email is transactional or not. Defaults tofalse. When marked astrue, the email will be sent even if the user has unsubscribed. USE WITH CAUTION!
- Name
personalizationsobject- Description
keyvaluepair custom data to be injected into the email.
Create Emails
Requests are instant and queued into a priority queue. Most requests will be processed within 30 seconds.
emails that can contain 1 to 60 emails made up of the following keys. Required Attributes
- Name
tostring- Description
The email address of the recipient.
- Name
fromstring- Description
The email address of the sender. Must be an author in your account.
- Name
subjectstring- Description
The subject of the email.
- Name
html_bodystring- Description
The HTML body of the email.
- Name
transactionalboolean- Description
Set
trueto send the email even if the user has unsubscribed. Defaults tofalse. Use with caution.
Optional Attributes
- Name
personalizationsobject- Description
keyvaluepair custom data to be injected into the email.
Response
Returns the count of emails queued for delivery.
- Name
resultsinteger- Description
Number of emails accepted and queued for delivery.
