Put each contact's own details in a campaign.
Register variables on a contact book, store values on contacts, and use them with fallbacks in campaign subjects and bodies. Every endpoint named here is in the API reference.
Personalisation lets you pull values from your contacts into campaign emails. You can use built-in fields like {{firstName}} and {{email}}, plus custom variables such as {{company}}, {{plan}}, or {{registrationCode}}.
How it works
- Register variables on the contact book. Add the variable names you want to use, such as
companyorplan. - Store values on each contact. Save the matching values in the console, by CSV import or through the API.
- Use the variables in a campaign. Choose that contact book in the campaign and insert the variables into the subject or the body.
- Send. Notix replaces each variable with that contact's value when it renders the campaign.
Available variables
These built-in variables are always available in campaigns:
{{email}}{{firstName}}{{lastName}}{{notix_unsubscribe_url}}
Custom variables come from the contact book's variable list.
Every campaign must include an unsubscribe link. Use the recipient-specific {{notix_unsubscribe_url}} variable as the link destination:
<a href="{{notix_unsubscribe_url}}">Unsubscribe</a>
Note: register a custom variable on the contact book before you use it in a campaign. Variable names may contain only letters, numbers and underscores.
Set up personalisation in the console
Add variables to your contact book
- Open Contacts
- Create a new contact book or open an existing one
- Add your variables as a comma-separated list, for example:
company, plan, registrationCode
Add values to your contacts
For each contact, save values for the variables you registered.
For example, a contact might look like this:
{
"email": "jane@example.com",
"firstName": "Jane",
"lastName": "Doe",
"properties": {
"company": "Acme",
"plan": "Pro",
"registrationCode": "WELCOME-2026"
}
}
You can add these values:
- manually from the contact editor
- through CSV import using matching column names
- through the Contacts API using
properties
Insert variables in your campaign
- Open or create a campaign
- Select the contact book that contains your variables
- Insert variables into the subject or email body
Examples:
Subject: Welcome to {{company}}
Hi {{firstName}},
You're currently on the {{plan}} plan.
Your registration code is {{registrationCode}}.
If a contact book is selected, the campaign editor will suggest the available variables automatically.
Fallback values
If a variable might be empty, you can provide a fallback value:
Hi {{firstName,fallback=there}},
This renders there when firstName is empty.
Using the API
Create a contact book with variables
curl -X POST "https://app.usenotix.dev/api/v1/contactBooks" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Customers",
"variables": ["company", "plan", "registrationCode"]
}'
Create a contact with variable values
curl -X POST "https://app.usenotix.dev/api/v1/contactBooks/<contactBookId>/contacts" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"email": "jane@example.com",
"firstName": "Jane",
"properties": {
"company": "Acme",
"plan": "Pro",
"registrationCode": "WELCOME-2026"
}
}'
Create a campaign that uses variables
curl -X POST "https://app.usenotix.dev/api/v1/campaigns" \
-H "Authorization: Bearer $NOTIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Welcome campaign",
"from": "Acme <hello@acme.com>",
"subject": "Welcome to {{company}}",
"contactBookId": "<contactBookId>",
"html": "<p>Hi {{firstName,fallback=there}}, your plan is {{plan}}.</p><p><a href=\"{{notix_unsubscribe_url}}\">Unsubscribe</a></p>"
}'
Best practices
| Best practice | Why it helps |
|---|---|
| Register variables before importing contacts | Keeps CSV columns and API properties aligned with the contact book |
| Keep variable names simple | Makes templates easier to read and maintain |
| Use fallbacks for optional data | Prevents awkward empty spaces when a contact is missing a value |
| Test with a small segment first | Helps you verify rendered output before sending to a larger audience |