In short: in a Resend broadcast, make your unsubscribe link's address the tag {{{RESEND_UNSUBSCRIBE_URL}}}, with three curly braces on each side: <a href="{{{RESEND_UNSUBSCRIBE_URL}}}">Unsubscribe</a>. Resend swaps it for a link that's unique to each person and each broadcast, and runs the unsubscribe page for you. The same tag works whether you write the HTML yourself, send it through the API or build it with React Email.
This guide covers where the tag goes, how to personalise with a fallback, what to do if you send marketing through the /emails endpoint instead, and the mistakes that leave you with a dead link.
Where the tag goes
Put it as the href of an ordinary link in your footer:
<p style="font-size:12px;color:#5c6472">
You're getting this because you signed up at example.com.
<a href="{{{RESEND_UNSUBSCRIBE_URL}}}" style="color:#5c6472;text-decoration:underline">Unsubscribe</a>
</p>
When the broadcast goes out, Resend replaces the tag with a link for that one recipient. Clicking it opens Resend's unsubscribe page, where the person can turn off individual topics or unsubscribe from everything, and Resend updates the contact for you. You can change the logo, colours and wording of that page in Resend's settings so it matches your brand.
If you build broadcasts in Resend's own editor, its Unsubscribe Footer adds a link like this for you. You only need to add the tag yourself when you bring your own HTML.
With the API or React Email
When you create a broadcast through the API, the tag goes inside the html you send, exactly as above. Resend's own example looks like this:
await resend.broadcasts.create({
segmentId: 'your-segment-id',
from: 'News <[email protected]>',
subject: 'This month',
html: 'Hi {{{contact.first_name|there}}}, you can unsubscribe here: {{{RESEND_UNSUBSCRIBE_URL}}}',
});
In React Email, put it in the link's href as a plain string: <Link href="{{{RESEND_UNSUBSCRIBE_URL}}}">Unsubscribe</Link>. React Email leaves the braces alone, so the tag reaches Resend as written. If you don't send a plain-text version, Resend makes one from the HTML.
Personalising with a fallback
Contact details use the same triple braces, with a fallback after a pipe for anyone whose field is empty:
{{{contact.first_name|there}}}gives "Hi Sam," or, with no first name, "Hi there,".{{{contact.last_name}}}and{{{contact.email}}}work the same way.
Always give a fallback for anything that can be empty, or someone gets "Hi ,". Older Resend examples use {{{FIRST_NAME|there}}}; the current documentation uses contact.first_name, so check which your account expects with a test send.
If you send marketing through /emails instead
The tag is for broadcasts (and automations), where Resend manages your contacts. If you send marketing one email at a time through the /emails endpoint, Resend isn't keeping track of who unsubscribed, so you need:
- your own unsubscribe link, pointing at a page that really removes the person;
List-UnsubscribeandList-Unsubscribe-Postheaders, because Gmail and Yahoo require one-click unsubscribe from bulk senders;- a way to stop sending to them, quickly. Google recommends acting within two days.
For most marketing emails, broadcasts are simpler because all of this is done for you.
Mistakes that break the link
- Two braces instead of three.
{{RESEND_UNSUBSCRIBE_URL}}isn't Resend's syntax, so the tag can go out as text. - Typos or spaces. The name must be exactly
RESEND_UNSUBSCRIBE_URL, in capitals. - An editor "fixing" the link. Some HTML editors and link checkers rewrite unknown addresses or add
https://in front, which breaks the tag. Look at the final code before you send. - Testing the link in a preview. In a preview or a test you copy from the editor, the tag hasn't been filled in yet. Send a real test broadcast to yourself and click it there.
- No unsubscribe at all. Marketing emails need one by law in most countries (see CAN-SPAM, CASL and the UK rules), and without it more people press "report spam" instead.
Check it before you send
A quick check catches all of the above:
- Search the HTML for
RESEND_UNSUBSCRIBE_URLand count the braces. - Check every personalisation tag has a fallback after the pipe.
- Send a test broadcast to yourself and click the unsubscribe link from the inbox.
The free merge tag checker reads Resend's triple braces and lists any tag with no fallback.
Questions
Does every Resend broadcast need an unsubscribe link?
Every marketing email does, under the laws in the US, Canada, the UK, the EU and Australia. Resend handles the unsubscribe for you once the tag is in the email, and its editor's Unsubscribe Footer adds it automatically.
Can I change what Resend's unsubscribe page looks like?
Yes. In Resend's settings you can change the logo, colours and message on the unsubscribe page so it matches your brand.
Why does my unsubscribe link show as text?
Usually because it has two braces instead of three, a typo in the name, or an editor changed the link. Check the code that was actually sent, then send yourself a real test broadcast.
Do transactional emails need it?
Transactional emails (receipts, password resets) are generally exempt from unsubscribe rules, and Resend's guidance says the same. If an email mixes a receipt with promotion, treat it as marketing.
All the Resend tags in one place, and the same for 12 other platforms: Resend email coding cheat sheet and every ESP cheat sheet.
Sources
- Resend: Broadcast editor (unsubscribe link and personalisation)
- Resend: Create Broadcast API
- Resend: Do you need an unsubscribe link?
- Resend: Unsubscribe page settings
- Google: Email sender guidelines
*Checked against Resend's documentation on 9 November 2026. Resend changes its product often, so check its docs for anything that looks different.*