POST /previews/rule-actions/send-email

Sends a test email.

Servers

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
id String No

ID of the message.

templates[] Array Yes

Array of message templates with language locale identifiers in RFC 5646 format. A language is selected based on the customer's locale.

If no locale is configured for the customer, en-US (US English) is used.

If no template is available in the customer's locale, a template locale is selected using a closest match algorithm.

If your email message templates are localized into more than one language, set a customer locale.

Invalid placeholders render as empty strings. For example, Hello {{invalid.placeholder}}! is rendered as Hello !.

templates[].to[] Array Yes

List of email addresses to which the email message is sent. Template placeholders are permitted. If a placeholder does not resolve to an email address, the address is not added.

templates[].html String Yes

HTML body of the message. To use content from the text field, leave this field empty. The use of template placeholders is permitted for this field.

templates[].text String Yes

Text body of the message. To use content from the html field, leave this field empty. The use of template placeholders is permitted for this field.

templates[].cc[] Array No

List of CC email addresses to which the email message is sent. Template placeholders are permitted. If a placeholder does not resolve to an email address, the address is not added.

templates[].bcc[] Array No

List of BCC email addresses to which the email message is sent. Template placeholders are permitted. If a placeholder does not resolve to an email address, the address is not added.

templates[].attachments[] Array No

Attachments of the email message.

templates[].attachments[].resourceId String Yes

ID of the attachment resource. Template placeholders are permitted.

templates[].attachments[].resourceType String Yes

Type of the attachment resource.

templates[].locale String Yes

Language locale identifier in RFC 5646 format.

templates[].subject String Yes

Subject of the message. The use of template placeholders is permitted for this field.

templates[].editor String No

Source of the message. This value is required for the email editor. This value is not used for sending emails. It is used by the editor to reproduce the message for future updates.

templates[].from String Yes

Email address of the sender.

Important: This value must be a verified email address.

To verify an email address:

  1. Create an email delivery setting. In the response, you receive the email and a token.
  2. Verify the email delivery by passing the token as the path parameter.

Template placeholders are permitted. If a placeholder does not resolve to a verified from address, the default verified from address is used.

version String No

Version number of the message. Use this field to distinguish between multiple messages by name and version number. If there are no versions, this field is empty.

weight Integer No

Weight distribution value that is assigned to a template for a split test. Each template in a split test can be assigned a weight. The higher the weight value, the more likely the message template is used.

The split test algorithm does not assess locale when making a weighted template selection.

Default value: 100

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.