---
title: "Unsubscribe from a sender"
description: "What the Unsubscribe button of the Subscriptions page does."
url: "https://openemail.uk/docs/api/subscriptions/unsubscribe"
area: "API"
category: "Mailbox"
---

# Unsubscribe from a sender

What the Unsubscribe button of the Subscriptions page does.

`POST /subscriptions/{id}/unsubscribe`

## POST /subscriptions/{id}/unsubscribe

What the Unsubscribe button of the Subscriptions page does.

## Example

Needs `threads:write`. It unsubscribes the way the sender asks for: a one-click request when it offers one, otherwise an unsubscribe email from the address the mail arrived at. `bin: true` also moves every conversation from the sender to the Bin. The body is optional.

**curl**

```
curl -X POST "$OE/subscriptions/sub_5d2c8e17/unsubscribe" -H "$AUTH" \
  -H "Content-Type: application/json" -d '{ "bin": true }'
```

**Response**

```
{
  "object": "unsubscribe",
  "subscriptionId": "sub_5d2c8e17",
  "method": "one-click",
  "url": null,
  "binned": 58
}
```

> A sender that only offers a page answers with `method` `link` and the page in `url`, which a person has to open.

> A sender that gives no way to unsubscribe is a 422 `unsubscribe_unsupported`, and one that did not accept the one-click request and gives no address to write to is a 502 `unsubscribe_refused`. Nothing changed in either case.

## Reference

- [`POST /subscriptions/{id}/unsubscribe`](https://openemail.uk/docs/api/reference/subscriptions#post-subscriptions-id-unsubscribe): full reference
