v4

latestOpenAPI 3.1.02026-07-3163216290.7 KB
Transactional emails

Send a transactional email

Send a transactional email to a contact.<br>Please email us to enable attachments on your account before using them with the API.

To set dynamic Subject, From, Reply to, CC, BCC email header fields, add data variables to those fields in the editor, then include data for each variable in the API request. Read our transactional email guide for more details.

post/v1/transactional

Headers

Idempotency-Keystring

Include a unique ID for this request (maximum 100 characters) to avoid duplicate emails.

The value should be a string of up to 100 characters and should be unique for each request. We recommend using V4 UUIDs or some other method with enough guaranteed entropy to avoid collisions during a 24 hour window.

This endpoint will return a 409 Conflict response if the idempotency key has been used in the previous 24 hours.

Request body

emailstring required

The recipient's email address.

transactionalIdstring required

The ID of the transactional email to send.

addToAudienceboolean

If true, a contact will be created in your audience using the email value (if a matching contact doesn't already exist).

dataVariablesobject

An object containing data as defined by the data variables added to the transactional email template. Values can be of type string or number.

If you have added optional data variables to your email, you can exclude them from the dataVariables object or set the value to "".

If you have added an array data variable to your email, make sure to include an array matching the data variables you added to your array block.

Example request

{
  "email": "alex@company.com",
  "transactionalId": "cll42l54f20i1la0lfooe3z12",
  "addToAudience": true,
  "dataVariables": {
    "name": "Alex",
    "passwordResetLink": "https://app.company.com/reset/abc123"
  }
}

Response

Successful send.

successboolean required

Example response

{
  "success": true
}