Template variables let you personalize notification content for each recipient. Define a variable schema on the template, use {{placeholder}} syntax in your content, and supply values at send time.

How do variables work?

  1. Declare — Add a variableSchema when creating or updating a template
  2. Reference — Use {{variableName}} in your template-channel content
  3. Supply — Pass variable values in the template.variables object when sending
{
  "variableSchema": {
    "customerName": { "type": "string" },
    "profileImage": { "type": "image" },
    "viewOrderUrl": { "type": "action" }
  }
}

What variable types are supported?

TypeDescriptionExample value
stringPlain text substitution"Jane Doe"
imageImage URL for rich notifications"https://cdn.example.com/pic.jpg"
actionActionable URL (button link, deep link)"https://example.com/orders/123"
All three types accept string values at send time. The type distinction helps channels render content appropriately — for example, an action variable may render as a tappable button in push notifications.

How is personalization applied per user?

When sending to multiple targets in batch mode, you supply a single set of variable values that applies to all recipients. For per-user personalization with different values per recipient, use the campaign CSV upload which supports variable columns mapped to each user row.

What happens with missing variables?

If the send payload is missing variables declared in the schema, the API returns an ERR_INVALID_VARIABLES error. All declared variables must be supplied at send time.

How do I update the variable schema?

Update the variableSchema field via the update template endpoint. Changing the schema does not retroactively affect previously sent notifications.
Use descriptive variable names like customerName instead of var1. They appear in the dashboard UI and make templates easier to manage.