> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openmail.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Suppressions

> OpenMail automatically suppresses sending to addresses that have bounced or unsubscribed. Learn how suppressions work and how to manage the list.

When an email bounces, a recipient marks your email as spam, or someone unsubscribes, we automatically add them to your suppression list. Subsequent send attempts to that address are rejected.

## Suppression types

| Type | Trigger | What it means |
| - | - | - |
| `bounce` | Hard bounce from recipient server | Address is invalid or doesn't exist |
| `complaint` | Recipient clicked "Report spam" | Recipient doesn't want email from you |
| `unsub` | Recipient unsubscribed | Recipient opted out |

## What happens when you send to a suppressed address

The send request returns `422` with a typed error:

```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
{
  "error": "recipient_suppressed",
  "type": "complaint"
}
```

Your agent should handle this gracefully - for example, by noting that the contact is unreachable and trying an alternative communication channel.

## One-click unsubscribe

One-click unsubscribe gives the recipient a way to opt out. OpenMail adds `List-Unsubscribe` and `List-Unsubscribe-Post` headers (RFC 8058), so Gmail, Yahoo and Apple Mail show their own **Unsubscribe** button. Gmail and Yahoo require these headers from bulk senders.

When the recipient unsubscribes, they become an `unsub` suppression for your whole organisation, not just the inbox that sent. You don't need to handle the opt-out yourself. Later sends to them return `422 recipient_suppressed`.

### On the shared domains

Inboxes on the shared `@omail.sh` and `@openmail.sh` domains get one-click unsubscribe automatically. OpenMail adds it to a send when all of these are true:

* It has one recipient, with no `cc` or `bcc`.
* The recipient isn't another OpenMail inbox.
* The recipient hasn't written to you on the thread yet.

You can't turn it off, and you can't set your own `List-Unsubscribe` header. Every organisation on the shared domains shares their reputation.

### On a custom domain

On a [custom domain](https://docs.openmail.sh/concepts/custom-domains.md), pass `"unsubscribe": true` on a [send](https://docs.openmail.sh/api-reference/messages/send-email.md) to add it:

```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
{
  "to": "lead@example.com",
  "subject": "Quick question",
  "body": "Hi Dana, ...\n\nNot interested? Unsubscribe: {{unsubscribe_url}}",
  "unsubscribe": true
}
```

To use your own unsubscribe system instead, set the headers yourself with `headers`. OpenMail never sees those opt-outs, so honouring them is up to you. You can't combine your own `List-Unsubscribe` with `"unsubscribe": true`.

```json theme={"theme":{"light":"github-light","dark":"dark-plus"}}
{
  "to": "lead@example.com",
  "subject": "Quick question",
  "body": "Hi Dana, ...",
  "headers": {
    "List-Unsubscribe": "<https://example.com/u/123>",
    "List-Unsubscribe-Post": "List-Unsubscribe=One-Click"
  }
}
```

### Rules

* Put `{{unsubscribe_url}}` in the body to show the unsubscribe link in the message.
* A body with `{{unsubscribe_url}}` is rejected when the send carries no unsubscribe link, so the placeholder never reaches a recipient unfilled.
* The link opts out the `to` address only, so you can't combine `"unsubscribe": true` with `cc` or `bcc`.
* An unsubscribed recipient stays blocked even if they later write to you, so your agent can't reply to them. If they ask to hear from you again, email [support@openmail.sh](mailto:support@openmail.sh) to lift the suppression.

Suppressions are one part of deliverability. For domain setup, warm-up and content, see [Email deliverability](https://docs.openmail.sh/best-practices/email-deliverability.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.