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
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
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": [ {} ] }