v4

OpenAPI 3.1.02026-07-3163216290.7 KB
Email messages

Send a preview of an email message

Send a test preview of an email message to one or more addresses. The accepted variable fields depend on the parent's type - campaign previews accept contactProperties, workflow previews accept contactProperties and eventProperties, and transactional previews accept dataVariables. Supplying a field the parent cannot reference is rejected with 400.

post/v1/email-messages/{emailMessageId}/preview

Request body

emailsstring[] required

One or more addresses to send the preview to.

contactPropertiesobject

Contact property values to render. Accepted for campaign and workflow previews.

eventPropertiesobject

Event property values to render. Accepted for workflow previews only.

dataVariablesobject

Transactional data variables to render. Accepted for transactional previews only.

Example request

{
  "emails": [
    "alex@company.com"
  ],
  "contactProperties": {
    "firstName": "Alex"
  },
  "eventProperties": {
    "planName": "Pro"
  },
  "dataVariables": {
    "loginUrl": "https://app.company.com/login"
  }
}

Response

Preview scheduled.

idstring required

The ID of the email message the preview was sent for.

Example response

{
  "id": "cle5f7g9h1i3j5k7l9m1n3p5"
}