---
title: "One-click unsubscribe REST API | HitKeep"
description: "Reference for the HitKeep REST API operation One-click unsubscribe, including request parameters, responses, and authentication notes."
canonical: "https://hitkeep.com/api/operations/apireportsunsubscribeopaque_token/post/"
---

# One-click unsubscribe REST API

POST

/api/reports/unsubscribe/{opaque_token}

FetchcURL

```
const url = 'http://127.0.0.1:25737/api/reports/unsubscribe/example';
const options = {method: 'POST'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```
curl --request POST \
  --url http://127.0.0.1:25737/api/reports/unsubscribe/example
```

-

RFC 8058 one-click unsubscribe endpoint. The opaque token is signed and only its hash is stored.

## Parameters

### Path Parameters

**opaque_token**

required

string

Opaque signed unsubscribe token.

## Responses

### 204

Unsubscribed

### 400

Invalid token

application/json

object

**message**

string

##### Examplegenerated

```
{
  "message": "example"
}
```

[Previous Unsubscribe from report](https://hitkeep.com/api/operations/apireportsunsubscribeopaque_token/get/)[Next Get report](https://hitkeep.com/api/operations/apireportsreport_id/get/)
