Mailfois
Resend

Resend email coding cheat sheet

The tags and rules you need to code an email or a module for Resend: the unsubscribe link, personalisation with a fallback, the view-in-browser and address tags, editable regions and how to get your HTML in. Checked against Resend's own documentation on 27 October 2026.

Unsubscribe
<a href="{{{RESEND_UNSUBSCRIBE_URL}}}">Unsubscribe</a>
First name
{{{contact.first_name}}} (Contact properties (triple braces))
With a fallback
{{{contact.first_name|there}}}

The Resend unsubscribe link

Put this in the footer of every marketing email you code for Resend:

<a href="{{{RESEND_UNSUBSCRIBE_URL}}}">Unsubscribe</a>
  • Put {{{RESEND_UNSUBSCRIBE_URL}}} in every broadcast: Resend makes a unique link per contact and broadcast, and runs the unsubscribe and topic preferences page for you.
  • Emails sent through the /emails endpoint (not broadcasts) need your own unsubscribe link and List-Unsubscribe headers.

The law in most countries also wants the unsubscribe to be easy to find and free to use: see the email rules by country.

Personalisation in Resend: first name with a fallback

Resend uses Contact properties (triple braces). A first name on its own:

{{{contact.first_name}}}

With a fallback, so an empty field never shows a blank or a raw tag:

{{{contact.first_name|there}}}

Showing something only to some people (an if / else):

Hi {{{contact.first_name|there}}},

Making a coded template editable in Resend

No editable-region markup. Broadcasts are written in the no-code editor, or sent as finished HTML (or React Email) through the API, so a coded email is edited as code.

<!-- Send as the html of a broadcast (POST /broadcasts), or build it with React Email -->

Getting your HTML into Resend

Send the finished HTML as the html field when creating a broadcast through the API (the Node.js SDK also takes a React Email component as react). Without a text version, Resend makes one from the HTML.

Limits worth knowing

  • The fallback after the pipe is used when the contact property is empty.
  • Broadcasts send from a verified domain to a segment.

What we couldn't confirm

We only list what Resend's documentation says. These points weren't clear from it, so test them in your account:

  • No if/else syntax found in the docs, so the conditional is a fallback only.
  • Whether HTML can be pasted straight into the dashboard editor; the docs describe the no-code editor and the API.
  • Older docs used {{{FIRST_NAME|there}}}; the current API reference uses {{{contact.first_name|there}}}.
  • No preferences, web version or postal address tag found.
Do it in Mailfois. Ask Mailfois, your email marketing assistant, writes modules and whole templates for Resend with these tags, fallbacks and editable regions already in place. Studio adds the unsubscribe and privacy links before you copy the code, and Brand Guard flags merge tags left without a fallback. How Ask Mailfois works · The Resend unsubscribe link in custom HTML · React Email dark mode

Questions

What is the unsubscribe tag in Resend?

{{{RESEND_UNSUBSCRIBE_URL}}}. Put {{{RESEND_UNSUBSCRIBE_URL}}} in every broadcast: Resend makes a unique link per contact and broadcast, and runs the unsubscribe and topic preferences page for you.

How do I add a first name with a fallback in Resend?

Resend uses Contact properties (triple braces). A first name is {{{contact.first_name}}}, and with a fallback: {{{contact.first_name|there}}}

How do I get a custom HTML email into Resend?

Send the finished HTML as the html field when creating a broadcast through the API (the Node.js SDK also takes a React Email component as react). Without a text version, Resend makes one from the HTML.

Sources

Checked by Mailfois against Resend's documentation on 27 October 2026. Platforms rename things often: spotted something out of date? Email [email protected].

Other platforms

Mailchimp · Klaviyo · HubSpot Marketing Hub · Salesforce Marketing Cloud Engagement · Braze · Adobe Marketo Engage · Bloomreach Engagement · Brevo · Constant Contact · Campaign Monitor · Dotdigital · Iterable

Code for Resend without looking up the tags.

Start with Ask Mailfois