Write an email once, send it from the API or as a campaign.
Start from the 54-email library, edit with blocks and variables, then send a template from the API or turn it into a campaign. Every endpoint named here is in the API reference.
Templates are saved emails you write once in the console and send many times, from the API or as a campaign. Each template has a name, a subject, a line of preview text, a type and a body.
Start from the library
Open Templates and choose New template, then Browse all 54 in the library. The starter library has 54 emails across 14 industries, from order confirmations and sign-in codes to newsletters and event invitations. Filter by industry or purpose, search, and preview each one on desktop and on a phone.
Use this template copies the email into your team's own templates, with your brand colour on the buttons and your logo at the top. The copy is yours: editing it never changes the library, and later changes to the library never change your copy.
Transactional or marketing
Every template has a type:
- Transactional: sent to one person because of something they did, such as a receipt or a password reset. No unsubscribe link is needed.
- Marketing: sent to many people, such as a newsletter. Notix adds the unsubscribe footer, and a campaign will not send without one.
You can change the type in the editor's Email tab. Switching to Marketing adds the unsubscribe footer if the email does not have one.
Edit the email
The editor shows the email as it will arrive, with its subject and preview text in an inbox row above it.
- Blocks adds headings, text, buttons, images, dividers, lists, quotes, code and the unsubscribe footer below the selected block. You can also type
/anywhere in the email. - Layers lists every block, so you can select one or move it up and down.
- Data lists the variables the email uses, with the values the preview shows. Preview values are kept in your browser only; real sends use the data you pass.
- The Block tab changes the selected block: a button's label, link, alignment, colour, corners and size, an image's alt text and link, a list's items, or a details table's rows and total.
- The Email tab sets the subject, preview text, type, content width and background.
- The Check tab runs the deliverability check, and warns when a button still links to
{{actionUrl}}or when the email asks the reader for a password, PIN, code or card detail.
Every change saves as you make it.
Variables
Type {{ in the email to insert a variable such as {{firstName}} or {{orderNumber}}. Library emails also link their main button to {{actionUrl}}, so one template can send each person to their own page.
When you send, pass the values in variables. A link that is exactly one variable, such as {{actionUrl}}, is only filled with an https, http, mailto or tel address.
import { Notix } from "notix-js";
const notix = new Notix(process.env.NOTIX_API_KEY);
await notix.emails.send({
to: "ada@example.com",
from: "Acme <hello@acme.com>",
templateId: "your-template-id",
variables: {
firstName: "Ada",
orderNumber: "A-91",
actionUrl: "https://acme.com/orders/A-91",
},
});
Note: a send may pass up to 200 variables, each up to 10,000 characters, and a batch up to 2,000,000 characters of variables in total. A subject longer than 998 characters once filled is cut there.
Copy a template's ID from the editor's top bar, or read it from the Data tab's example. See the Emails API reference for every field.
Send a template as a campaign
In the editor, choose Use in campaign. The campaign gets its own copy of the template: editing the template later will not change the campaign, and editing the campaign will not change the template. A transactional template gains the unsubscribe footer in the campaign's copy.
Pick a contact list or segment and a verified sender, then Continue to review. The review screen checks the audience, the sender, the subject, deliverability, the unsubscribe link, contacts missing a variable and your plan's remaining emails, and lets you send now or schedule. See campaign personalisation for contact variables.