Skip to main content

Unsubscribe

To help recipients easily opt out of future emails, we support two unsubscribe mechanisms:

  1. Unsubscribe Link
  2. List-Unsubscribe Headers

You can add a system placeholder in your email content: mc-unsubscribe-url. During rendering, this placeholder will be replaced with a unique unsubscribe URL that directs the recipient to a one-click unsubscribe page hosted by us.

  • Emails must use templates with a specified template_type. Currently, the only supported type is mustache.
  • Each personalization must include exactly one recipient.

For more information on templates, see the Email Templates Page.

note

Note: This feature only supports text/html and text/plain email content types.

It is recommended to include the mc-unsubscribe-url placeholder inside an <a> element as the value of the href attribute. This ensures proper rendering and behaviour across email clients.

"content": [
{
"type": "text/html",
"value": "<html><head></head><body><a href='{{mc-unsubscribe-url}}'>unsubscribe</a></body></html>",
"template_type": "mustache"
}
]

Include the mc-unsubscribe-url in the content:

"content": [
{
"type": "text/plain",
"value": "To unsubscribe, visit: {{mc-unsubscribe-url}}",
"template_type": "mustache"
}
]

List-Unsubscribe Headers

These headers help email clients (like Gmail and Apple Mail) display a native Unsubscribe option at the top of the message. We automatically include both List-Unsubscribe and List-Unsubscribe-Post headers in emails when the transactional field is set to false in the send request. When transactional is false, the following conditions must also be met:

  • Each personalization contains exactly one recipient
  • The email is DKIM signed