Body Parameters
Sender email address.To include a friendly name, use the format
"Your Name <sender@domain.com>"
.Recipient email address. For multiple addresses, send as an array of strings.
Max 50.
Email subject.
Bcc recipient email address. For multiple addresses, send as an array of
strings.
Cc recipient email address. For multiple addresses, send as an array of
strings.
The HTML version of the message.
The plain text version of the message.
If not provided, the HTML will be used to generate a plain text version. You
can opt out of this behavior by setting value to an empty string.
The React component used to write the message. Only available in the Node.js
SDK.
Custom headers to add to the email.
Filename and content of attachments (max 40MB per email, after Base64 encoding of the attachments).See examples
Custom data passed in key/value pairs.See examples.
Templates API is currently in private beta and only available to a limited
number of users.
template
object with:id
: id of the published templatevariables
: array of variable objects (if applicable)
If a
template
is provided, you cannot send html
, text
, or react
in the payload, otherwise the API will return a validation error.When sending a template, the payload for from
, subject
, and reply_to
take precedence over the template’s defaults for these fields. If the template does not provide a default value for these fields, you must provide them in the payload.The id of the published email template. Required if
template
is provided. Only published templates can be used when sending emails.See the errors reference for more details.Template variables object with key/value pairs.When sending the template, the HTML will be parsed. If all the variables used in the template were provided, the email will be sent. If not, the call will throw a validation error.See the errors reference for more details.See examples.
Headers
Add an idempotency key to prevent duplicated emails.
- Should be unique per API request
- Idempotency keys expire after 24 hours
- Have a maximum length of 256 characters