---
title: "Suppressions"
description: "`suppressions.list`, `list_all`, `iterate`, `get`, `add` and `remove`."
url: "https://openemail.uk/docs/ruby/suppressions"
area: "Ruby"
category: "Mailbox"
---

# Suppressions

`suppressions.list`, `list_all`, `iterate`, `get`, `add` and `remove`.

## Every method

**suppressions.rb**

```
complaints = client.suppressions.list_all(reason: "complaint")
puts complaints.map { |row| row[:email] }

row = client.suppressions.add(email: "noreply@example.com")

client.suppressions.remove(row[:id]) if row[:removable]
```

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::SUPPRESSION_REASONS` names them.

> `add` returns the row whether it was new or already there. `remove` refuses a hard bounce with 409 `suppression_not_removable`, raised as `OpenEmail::ConflictError`, which `removable` tells you ahead of time. A key limited to particular addresses or domains can read the list and cannot change it.
