Send a test email

Request

Sends a test email.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Test email resource.

idstring, (uuid)

ID of the message.

versionstring

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.

weightinteger, [ 0 .. 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.

Default:100
Example:75
templatesArray of objects, non-emptyrequired

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 !.

Example:
[ { "locale": "fr-FR", "from": "example@example.com", "to": [ … ], "subject": "Sujet de démonstration", "text": "Texte de démonstration", "html": "<p>Texte de démonstration</p>", "editor": "<div class=\"block\">Texte de démonstration</div>" } ]
curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/previews/rule-actions/send-email \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "version": "string",
    "weight": 75,
    "templates": [
      {
        "locale": "fr-FR",
        "from": "example@example.com",
        "to": [
          "{{ invoice.customer.email }}"
        ],
        "subject": "Sujet de démonstration",
        "text": "Texte de démonstration",
        "html": "<p>Texte de démonstration</p>",
        "editor": "<div class=\"block\">Texte de démonstration</div>"
      }
    ]
  }'

Responses

Test email sent.

Headers
Rate-Limit-Limitinteger

Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.

Example:500
Rate-Limit-Remaininginteger

Number of requests still available for this rate limit. For more information, see Rate limits.

Example:499
Bodyapplication/json
idstring, (uuid)

ID of the message.

versionstring

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.

weightinteger, [ 0 .. 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.

Default:100
Example:75
templatesArray of objects, non-emptyrequired

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 !.

Example:
[ { "locale": "fr-FR", "from": "example@example.com", "to": [ … ], "subject": "Sujet de démonstration", "text": "Texte de démonstration", "html": "<p>Texte de démonstration</p>", "editor": "<div class=\"block\">Texte de démonstration</div>" } ]
Response
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "version": "string", "weight": 75, "templates": [ { … } ] }