|
| 1 | +# suppressions |
| 2 | + |
| 3 | +Detailed flag specifications for `resend suppressions` commands. |
| 4 | + |
| 5 | +> **Beta:** Suppressions is a pre-GA feature gated per account. Commands appear in |
| 6 | +> `--help` but return an API error unless the suppression list is enabled for your |
| 7 | +> account. Reach out to Resend to join the beta. |
| 8 | +
|
| 9 | +Suppressions block future sends to an address. Each entry has an `origin`: |
| 10 | + |
| 11 | +| Origin | Meaning | |
| 12 | +|--------|---------| |
| 13 | +| `bounce` | Added automatically after a hard bounce | |
| 14 | +| `complaint` | Added automatically after a spam complaint | |
| 15 | +| `manual` | Added by you via `suppressions add` | |
| 16 | + |
| 17 | +`get` and `delete` accept **either** a suppression ID **or** the email address. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## suppressions list |
| 22 | + |
| 23 | +List suppressed addresses (default subcommand — `resend suppressions` alone runs it). |
| 24 | + |
| 25 | +| Flag | Type | Required | Description | |
| 26 | +|------|------|----------|-------------| |
| 27 | +| `--limit <n>` | number | No | Max results, 1-100 (default 10) | |
| 28 | +| `--after <cursor>` | string | No | Forward pagination cursor | |
| 29 | +| `--before <cursor>` | string | No | Backward pagination cursor | |
| 30 | +| `--origin <origin>` | string | No | Filter: `bounce` \| `complaint` \| `manual` | |
| 31 | + |
| 32 | +**Alias:** `ls` |
| 33 | + |
| 34 | +**Output:** `{"object":"list","has_more":false,"data":[{"object":"suppression","id":"...","email":"...","origin":"bounce|complaint|manual","source_id":"..."|null,"created_at":"..."}]}` |
| 35 | + |
| 36 | +--- |
| 37 | + |
| 38 | +## suppressions add |
| 39 | + |
| 40 | +Suppress a single email address (origin `manual`). |
| 41 | + |
| 42 | +**Argument:** `<email>` — email address to suppress (required in non-interactive mode) |
| 43 | + |
| 44 | +**Output:** `{"object":"suppression","id":"..."}` |
| 45 | + |
| 46 | +--- |
| 47 | + |
| 48 | +## suppressions get |
| 49 | + |
| 50 | +Retrieve a single suppression. |
| 51 | + |
| 52 | +**Argument:** `<id-or-email>` — suppression ID or the suppressed email address |
| 53 | + |
| 54 | +**Output:** `{"object":"suppression","id":"...","email":"...","origin":"...","source_id":"..."|null,"created_at":"..."}` |
| 55 | + |
| 56 | +--- |
| 57 | + |
| 58 | +## suppressions delete |
| 59 | + |
| 60 | +Remove a suppression so Resend can send to the address again. |
| 61 | + |
| 62 | +**Argument:** `<id-or-email>` — suppression ID or the suppressed email address |
| 63 | + |
| 64 | +| Flag | Type | Required | Description | |
| 65 | +|------|------|----------|-------------| |
| 66 | +| `--yes` | boolean | Yes (non-interactive) | Skip confirmation | |
| 67 | + |
| 68 | +**Alias:** `rm` |
| 69 | + |
| 70 | +**Output:** `{"object":"suppression","id":"...","deleted":true}` |
| 71 | + |
| 72 | +--- |
| 73 | + |
| 74 | +## suppressions batch add |
| 75 | + |
| 76 | +Suppress up to 100 addresses in one request. |
| 77 | + |
| 78 | +| Flag | Type | Required | Description | |
| 79 | +|------|------|----------|-------------| |
| 80 | +| `--file <path>` | string | Yes (non-interactive) | JSON file with an array of email strings (`-` for stdin) | |
| 81 | + |
| 82 | +**File format:** `["a@example.com", "b@example.com"]` |
| 83 | + |
| 84 | +**Output:** `{"data":[{"object":"suppression","id":"..."}]}` |
| 85 | + |
| 86 | +--- |
| 87 | + |
| 88 | +## suppressions batch remove |
| 89 | + |
| 90 | +Remove up to 100 suppressions in one request. |
| 91 | + |
| 92 | +| Flag | Type | Required | Description | |
| 93 | +|------|------|----------|-------------| |
| 94 | +| `--file <path>` | string | Yes (non-interactive) | JSON file with an array of strings (`-` for stdin) | |
| 95 | +| `--ids` | boolean | No | Treat file entries as suppression IDs instead of emails | |
| 96 | + |
| 97 | +**Alias:** `rm` |
| 98 | + |
| 99 | +**File format:** `["a@example.com", "b@example.com"]` (or IDs with `--ids`) |
| 100 | + |
| 101 | +**Output:** `{"data":[{"object":"suppression","id":"...","deleted":true}]}` |
0 commit comments