Templates
Create reusable email templates for your campaigns, workflows and transactional emails
Templates are stored in the Plunk dashboard and can be used in campaigns, workflows, and transactional emails sent through /v1/send.
Anatomy of a template
A template bundles everything needed to render an email: content, sender, and behaviour.
Prop
Type
When a template is used by /v1/send, the request can override any of subject, body, from, fromName, replyTo — the template's values act as defaults.
Sender domain verification
The from address must be on a verified domain. Creating or updating a template with an unverified from returns 403. See Verifying domains.
Designing templates
Templates can be created using the built-in editor or by uploading your own HTML.
Personalization
You can use contact data to personalize your templates by using the handlebars syntax {{ key }}, where key is the contact data key. Subjects and bodies are rendered with Liquid, so besides variables like {{ key }} you also get conditionals, loops and filters. See Template language for the full reference.
<p>Hi {{firstName ?? 'there'}},</p>
{% if locale == 'es' %}
<p>Tu plan {{plan | upcase}} se renueva pronto.</p>
{% else %}
<p>Your {{plan | upcase}} plan renews soon.</p>
{% endif %}Always Available Variables
These variables are always available in your templates, regardless of custom contact data:
| Variable | Description |
|---|---|
{{id}} | The contact's unique identifier |
{{email}} | The contact's email address |
{{unsubscribeUrl}} | URL to the unsubscribe page |
{{subscribeUrl}} | URL to the subscribe/resubscribe page |
{{manageUrl}} | URL to the preferences management page |
Fallback Values
You can provide fallback values for variables that might not be set:
Hello {{firstName ?? 'there'}}!If firstName is not set, this will render as "Hello there!" Liquid's default filter does the same thing and can fall back to another variable rather than a literal:
Hello {{firstName | default: nickname}}!Conditionals, loops and filters
Anything Liquid supports works in a template — branch on a custom field, loop over an array, or transform a value with a filter:
{% case plan %}
{% when 'pro' %}<p>Here's 20% off your renewal.</p>
{% when 'free' %}<p>Upgrade and save 20%.</p>
{% else %}<p>Thanks for being with us.</p>
{% endcase %}
<ul>
{% for item in cartItems %}
<li>{{item.name}} — {{item.price | times: quantity | round: 2}}</li>
{% endfor %}
</ul>This lets a single campaign cover combinations that would otherwise need one campaign per segment — e.g. three languages × two offers in one send instead of six. See Template language.
Special Fields
The following fields are reserved by Plunk but can still be used.
| Variable | Description |
|---|---|
{{subscribed}} | Contact's subscription status (true/false) |
{{locale}} | Contact's preferred locale (e.g., 'en', 'fr', 'es') |
Previewing templates
You can preview your templates by selecting a contact in the preview window. This will allow you to see how the template will look for that specific contact, with their data populated.
Duplicating and finding usage
POST /templates/:id/duplicate— creates an editable copy. Useful for A/B variants or as a starting point for related emails.GET /templates/:id/usage— lists every campaign, workflow step, and other reference that points at this template. Use this to answer "what breaks if I change this template?" or to find leftover references before deletion.
Templates types
There are three types of templates in Plunk. Each type is treated at the same priority when sending emails, you should not pick one type over the other based on deliverability or performance.
| Type | Respects opt-out | Plunk unsubscribe footer | Description |
|---|---|---|---|
| Marketing | Yes | Yes | Automatically includes a Plunk-hosted unsubscribe footer. Will not be sent to contacts who are unsubscribed |
| Transactional | No | No | Does not include any way to unsubscribe. Will be sent to any contact, regardless of subscription state |
| Headless | Yes | No | Respects opt-out like marketing, but no Plunk footer is appended. You are responsible for providing an unsubscribe mechanism in the email body. Use {{unsubscribeUrl}} or {{manageUrl}} to link to Plunk's managed unsubscribe page |
What's next
Template language
Conditionals, loops and filters with Liquid.
Transactional emails
Send templated emails directly through /v1/send.
Campaigns
Broadcast a template to a segment or audience.
Workflows
Send templates as part of automated journeys.
Localization
Translate the unsubscribe footer and contact-facing pages.