# Suppression lists

> Keep unsubscribed, bounced and opted-out addresses out of bulk mail, and review opt-outs found in replies.

URL: https://docs.workwae.com/guides/suppressions

A suppression list holds addresses that bulk mail must skip. Sends and [mail merges](/guides/mail-merge) name a list with `listId`; how that adds unsubscribe headers and links is in [Unsubscribe links](/guides/tracking#unsubscribe). Lists need the mail module in the tenant's plan; without it these routes answer 403 `plan_module_unavailable`.

## Lists

- A send naming a list skips every address on that list and on the built-in `global` list. A send naming no list consults neither, unless the `suppressionCheck` setting is `always` ([below](#always)).
- A permanent bounce that says an address is gone puts that address on the global list, so one dead address stays off every list. For a send that named a list it is that send's one recipient. For a send that named no list it is any `to`, `cc` or `bcc` address the send went to; a notice naming anyone else suppresses nothing. The same holds when the SMTP server refuses a recipient at once: where it says which recipients it refused, each is judged by its own reply; where it does not, only a send with exactly one recipient suppresses. A refusal for policy or content (`5.7.x`) or a full mailbox suppresses nothing. Every bounce is also reported as `message.bounced`.
- The global list cannot be deleted or renamed.

Create a list to give it a name and description. Its `id` is what sends name as `listId` and cannot change later.

```bash tab="cURL"
curl -X POST "https://api.workwae.com/v1/suppressions" \
  -H "Authorization: Bearer $WORKWAE_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "id": "weekly-news", "name": "Weekly news", "description": "The Friday newsletter" }'
```

```ts tab="TypeScript"
const list = await workwae.suppressions.create({
  id: "weekly-news",
  name: "Weekly news",
  description: "The Friday newsletter",
});
```

A send or add naming a list that does not exist still works and creates it, named after its id. `GET /v1/suppressions` returns every list, global first, with its count of addresses by source.

## How addresses get on a list

| Source | Meaning |
| --- | --- |
| `unsubscribe` | The recipient used the one-click header or the unsubscribe link. |
| `bounce` | A permanent bounce or an immediate SMTP refusal said the address is gone, for a recipient of the send. Always the global list. |
| `api` | You added it with `POST /v1/suppressions/{listId}/entries`. |
| `reply` | A reply asked to stop receiving the mail, as detected by Workwae. |
| `complaint` | The recipient's provider forwarded a spam report (ARF). |
| `inactive` | An auto-reply said the person left or moved to another address, as detected by Workwae, and you approved its review. Always the global list. |
| `invalid` | [Email validation](/guides/email-validation) with `suppressInvalid` found the address cannot receive mail. Always the global list. |

Every source except `api` and `invalid` emits `suppression.created`. Adds through the API, validation included, are recorded in the [audit log](/guides/audit-log) instead.

## Detected opt-outs

Replies and spam reports are detected, not stated, so the `optOutHandling` setting (`PATCH /v1/settings`) decides what they do:

| Value | Effect |
| --- | --- |
| `review` (default) | Replies wait in `GET /v1/suppression-reviews` with the message they came from and the detection's confidence. A spam report is certain, so it suppresses at once. |
| `suppress` | The address goes on the list at once. |
| `off` | Detected opt-outs are ignored. |

- `POST /v1/suppression-reviews/{reviewId}/approve` suppresses the address; `/dismiss` drops the review.
- An auto-reply saying the person left the company or changed address always waits for review (source `inactive`, global list) under both `review` and `suppress`, since such replies can be wrong or temporary. `off` ignores it. The review lists the addresses the reply names to write to instead.

> **Unsubscribe links always suppress**
>
> The setting covers detected opt-outs only. One-click unsubscribe and the unsubscribe link suppress regardless of it, as RFC 8058 and the Gmail and Yahoo sender rules require.

## Check every send

The `suppressionCheck` setting (`PATCH /v1/settings`; an account's own `settings` override it) decides which sends consult the global list:

| Value | Effect |
| --- | --- |
| `lists` (default) | Only sends that name a `listId`, which also consult that list. |
| `always` | Every send. One naming no list is refused with 400 `suppressed` when a `to`, `cc` or `bcc` address is on the global list, `data.addresses` naming them, and fails at delivery with `send.failed` code `suppressed` if an address was suppressed while it waited. |

A send naming a list behaves the same under both values. A [mail merge](/guides/mail-merge) entry that is refused fails alone.

## Delete a list

- `DELETE /v1/suppressions/{listId}` refuses a list that still holds addresses with 409 `suppression_list_not_empty`.
- Add `?withEntries=true` to delete its addresses with it. Later sends naming the list reach those addresses again unless the global list holds them.
- The list's pending reviews are removed either way.

All routes are in the [Suppressions reference](/reference/suppressions).
