template, leave out html and text: they come from the template. subject and from are optional and replace the template’s when you send them. Attachments, tags, headers and idempotency keys work as usual.
Create a template
In the dashboard, open Templates and click New template. Start from a ready-made design (verification code, welcome, password reset, receipt, invoice, invitation, sign-in alert) or from your own HTML. You can also create one with the API:"starter": "otp" instead of html to start from a ready-made design. Starters: otp, welcome, password-reset, receipt, invoice, invitation, sign-in-alert.
Slugs
The slug is what your code sends: lowercase letters, digits and hyphens, 3 to 64 characters, unique in your team. Without one, PulseSend makes it from the name. When you rename a slug, the old one keeps working as an alias, so code already deployed doesn’t break. You can also use the template ID (tpl_…) anywhere a slug is accepted.
Drafts and versions
You always edit a draft. Nothing can be sent with a template until its first version is published, and emails keep using the published version while you edit. Publishing (in the dashboard, orPOST /templates/{slug}/publish) turns the draft into the next version, v1, v2 and so on, and every email switches to it right away. To keep a call on a known version, pin it:
Syntax
Templates use Mustache. Subject, HTML and text all accept it.
Partials, blocks, pragmas and delimiter changes are not supported. A template that doesn’t parse is refused when you save it, with
template_syntax_error and the line.
Inside {{#items}}, names refer to the current item, so a receipt can list its lines:
Variables
PulseSend finds the variables in the subject, HTML and text. For each one, choose in the editor (or withvariables in the API):
- Required: the send fails with
422 template_variable_missingifdatadoesn’t have it, so nobody gets “Hello ,”. - A default value: used when
datadoesn’t have it. - An example: used only for the preview and test sends.
Team brand
Set your logo, color and postal address once in Settings › Team. They are always available as{{brand.name}}, {{brand.logo_url}}, {{brand.color}}, {{brand.on_color}} (black or white, whichever reads on your color) and {{brand.address}}. You never send them in data.
Preview and test
POST /templates/{slug}/render returns the subject, HTML and text a send would produce, without sending anything. It renders the draft, using examples for missing variables; pass "version": 3 to render a published version with the same checks as a real send.
In the dashboard, Send a test sends the draft with its examples to a member of your team. It counts as a live email.
Plain text
Without a text version, PulseSend writes one from the HTML: headings and paragraphs on their own lines, links aslabel (url). Write your own in the Text tab or in text to replace it.
Limits
Scopes:
templates:read (list, read, render, versions) and templates:write (create, edit, publish, delete). New keys get both.
