---
title: "Block a contact"
description: "Puts the address on the workspace blocklist, the one `PATCH /settings` edits as `blockedSenders`, so mail from it is refused from then on. This is Block on a contact in the app. The address does not have to be a contact."
url: "https://openemail.uk/docs/api/contacts/block"
area: "API"
category: "Mailbox"
---

# Block a contact

Puts the address on the workspace blocklist, the one `PATCH /settings` edits as `blockedSenders`, so mail from it is refused from then on. This is Block on a contact in the app. The address does not have to be a contact.

`POST /contacts/{email}/block`

## POST /contacts/{email}/block

Puts the address on the workspace blocklist, the one `PATCH /settings` edits as `blockedSenders`, so mail from it is refused from then on. This is Block on a contact in the app. The address does not have to be a contact.

## Example

Needs `settings:write`, because it writes the blocklist rather than the contact. URL-encode the `@`.

**curl**

```
curl -X POST "$OE/contacts/offers%2Bweekly%40shop.example/block" -H "$AUTH"
```

**Response**

```
{
  "object": "contact_block",
  "email": "offers@shop.example",
  "blocked": true,
  "blockedBy": { "rule": "offers@shop.example", "list": "blockedSenders" },
  "created": true
}
```

> A plus tag is dropped, so blocking `offers+weekly@shop.example` blocks `offers@shop.example` and every tag of it.

> When a rule already blocks the address, a whole-domain rule included, nothing is added: `created` is false and `blockedBy` names that rule. Sending the same call again is therefore safe.

> An address with fewer than two letters or numbers is a `422` `blocklist_entry_too_broad`.
