Send a test email

Sends a test email.

SecuritySecretApiKey or JWT
Request
Request Body schema: application/json

Test email resource.

required
Array of objects non-empty

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 an empty strings. For example, Hello {{invalid.placeholder}}! is rendered as Hello !.

Array (non-empty)
locale
required
string

Language locale identifier in RFC 5646 format.

subject
required
string <= 998 characters

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

text
required
string

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.

html
required
string

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.

from
required
string <= 254 characters

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.

to
required
Array of strings non-empty

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.

cc
Array of strings

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.

bcc
Array of strings

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.

editor
string

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.

Array of objects

Attachments of the email message.

id
string <uuid>

ID of the message.

version
string

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 [ 0 .. 100 ]
Default: 100

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.

Responses
200

Test email sent.

Response Schema: application/json
required
Array of objects non-empty

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 an empty strings. For example, Hello {{invalid.placeholder}}! is rendered as Hello !.

Array (non-empty)
locale
required
string

Language locale identifier in RFC 5646 format.

subject
required
string <= 998 characters

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

text
required
string

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.

html
required
string

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.

from
required
string <= 254 characters

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.

to
required
Array of strings non-empty

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.

cc
Array of strings

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.

bcc
Array of strings

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.

editor
string

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.

Array of objects

Attachments of the email message.

id
string <uuid>

ID of the message.

version
string

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 [ 0 .. 100 ]
Default: 100

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.

401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

422

Invalid data sent.

post/previews/rule-actions/send-email
Request samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "version": "string",
  • "weight": 75,
  • "templates": [
    ]
}
Response samples
application/json
{
  • "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  • "version": "string",
  • "weight": 75,
  • "templates": [
    ]
}