Templates

Template Dynamic Variables

Inject dynamic application variables into email templates.

Templates support dynamic variables using double curly brace syntax.

Syntax Example

html
<h1>Hello {{customerName}}</h1>
<p>Your order number <strong>#{{orderNumber}}</strong> is confirmed.</p>

When sending an email via POST /v1/emails/send, supply values in the data object:

json
{
  "templateId": "order-confirmation",
  "to": "user@example.com",
  "data": {
    "customerName": "Sarah",
    "orderNumber": "ORD-7749"
  }
}