Using Variables in Notifications
You can insert variables into:- Content Blocks (Text, Action, Markdown, Quote, Template, List)
- Handlebars code (Template blocks, Email templates, Brands)
- Email subject line and addresses (From, Reply-To, CC, BCC)
- Notification Conditions to control notification sending
- Channel Conditions to enable or disable specific channels
- Filters to conditionally show or hide content blocks

Example of Variable Replacement in Rendered Preview
Content Blocks
Enclose the variable name in single curly brackets:{variable_name}. Properly formatted variables inside Text, Markdown, Quote, and List Blocks are highlighted in green.

Text Block With Variables
Handlebars
In Handlebars, use double curly brackets{{ }} with the var or path helper:
- Data object:
{{var "variable_name"}} - Profile data:
{{var "profile.variable_name"}}
Email Fields
Variables are also supported in theSubject line, From address, Reply-To, CC, and BCC fields in the email channel settings.

Email Subject With Variables

Email Channel Settings
Data Sources
Courier resolves variables from the Notification Context, which has four top-level keys. Each data source has its own JSONPath prefix:The Data Object
The Data object is an optional property of the Send call. Use it to pass key-value pairs into your notification template.The User Profile
User Profile data can come from two places:- The
profileobject in the Send API request. - The stored User Profile associated with the recipient ID, created via the Profiles API.
The profile is extensible; any custom fields you store on the profile are accessible via
{profile.yourField}.
If a key exists in both the Send API
profile object and the stored User Profile, the Send API value takes precedence.Built-in Variables
Courier automatically populates these variables during the send process. You can use them in notification content and settings:Tenant
The Tenant object contains information about the tenant associated with the send. Access tenant properties with{tenant.name} in content blocks or {{var "tenant.name"}} in Handlebars.