Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Add an unsubscribe link to transactional emails

Resend doesn't manage contact lists for transactional emails.

If you manage your own list, you can add the List-Unsubscribe: https://example.com/unsubscribe header when sending emails using the Resend API.

As of February 2024, your bulk messages must include a URL version in your list-unsubscribe header, List-Unsubscribe-Post: List-Unsubscribe=One-Click, and to allow for a POST request from the same URL. This follows RFC 8058 (Signaling One-Click Functionality for List Email Headers).

When receiving a POST, return a blank page with 200 (OK) or 202 (Accepted), and show the regular unsubscribe page with the GET method. Ensure that users stop receiving email within 48 hours of this request.

This header allows email clients to offer a one-click "Unsubscribe" option in their UI, enhancing user experience and decreasing spam complaints. Gmail and Yahoo require RFC 8058 compliance for bulk senders (those sending more than 5,000 messages per day to their domains).

You can read more about this requirement in our Bulk Sending Requirements blog post.

Node.js
import { Resend } from 'resend';const resend = new Resend('re_xxxxxxxxx');await resend.emails.send({  from: 'Acme <onboarding@resend.dev>',  to: ['delivered@resend.dev'],  subject: 'hello world',  text: 'it works!',  headers: {    'List-Unsubscribe': '<https://example.com/unsubscribe>',  },});
Suggest an edit

Propose a replacement for this page. The site team reviews it before applying any changes.

Export
Documentation menu