---
title: "Suppressions"
description: "`suppressions->list`, `listAll`, `iterate`, `get`, `add` and `remove`."
url: "https://openemail.uk/docs/php/suppressions"
area: "PHP"
category: "Mailbox"
---

# Suppressions

`suppressions->list`, `listAll`, `iterate`, `get`, `add` and `remove`.

## Every method

**suppressions.php**

```
use OpenEmail\Constants\SuppressionReasons;

$complaints = $client->suppressions->listAll(reason: SuppressionReasons::COMPLAINT);
echo implode(', ', array_column($complaints, 'email')), PHP_EOL;

$row = $client->suppressions->add(['email' => 'noreply@example.com']);

if ($row['removable']) {
    $client->suppressions->remove($row['id']);
}
```

The addresses this workspace will not send to: hard bounces and complaints, recorded as they happen, and any address blocked by hand. A send to one is refused for that recipient before anything leaves. Reading needs `settings:read` and changing needs `settings:write`, the scopes the Blocked addresses screen is gated on. `reason:` keeps one kind, `bounce`, `complaint` or `manual`, and `OpenEmail\Constants\SuppressionReasons` names them. `q:` searches the addresses.

`list` returns one `OpenEmail\Result\Page`, newest first, `listAll` returns every row in one array, and `iterate` returns a `Generator` that yields one row at a time. A row is an array with `id`, `email`, `reason`, `detail`, `removable` and `createdAt`, and `add` takes one array with `email`.

> `add` returns the row whether it was new or already there, so repeating it is harmless and the client retries it after a network failure. `remove` refuses a hard bounce with 409 `suppression_not_removable`, thrown as a `ConflictException`, which `removable` tells you ahead of time. A key limited to particular addresses or domains can read the list and cannot change it: `add` and `remove` answer it with a 422 `capability_unsupported`.
