---
title: "Unsubscribe from the sender of a thread"
description: "What the Unsubscribe button of the reading pane does."
url: "https://openemail.uk/docs/api/threads/unsubscribe"
area: "API"
category: "Mailbox"
---

# Unsubscribe from the sender of a thread

What the Unsubscribe button of the reading pane does.

`POST /threads/{id}/unsubscribe`

## POST /threads/{id}/unsubscribe

What the Unsubscribe button of the reading pane does.

## Example

Needs `threads:write`. It finds the subscription behind the newest message of the thread that carries a `List-Unsubscribe` header, and unsubscribes from it the way the sender asks for, as `POST /subscriptions/{id}/unsubscribe` does.

**curl**

```
curl -X POST "$OE/threads/thr_7c1e4a90/unsubscribe" -H "$AUTH"
```

**Response**

```
{
  "object": "unsubscribe",
  "threadId": "thr_7c1e4a90",
  "subscriptionId": "sub_5d2c8e17",
  "method": "email",
  "url": null,
  "binned": 0
}
```

> A thread with no message that carries the header, like a sender that gives no way to unsubscribe, is a 422 `unsubscribe_unsupported`, and a sender that did not accept the request is a 502 `unsubscribe_refused`. A thread the key does not reach is a 404.

## Reference

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