> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pacifica.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Unregister Web Push Subscription

> This endpoint allows users to stop Web Push notifications to a browser installation.

```http theme={null}
POST /api/v1/account/notifications/web_push/subscription/unregister
```

This endpoint turns off one browser's push subscription on your account. Pacifica stops sending `web_push` notifications to it, and drops pushes that it hasn't sent yet. Call it when the user signs out or switches account.

#### Operation Type (for Signing)

| Header Field | Type | Content |
| - | - | - |
| `"type"` | string | `"unregister_web_push_subscription"` |

#### Request Body

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th>Description</th><th>Example</th></tr></thead><tbody><tr><td>`"account"`</td><td>string</td><td>required</td><td>User's wallet address</td><td>`42trU9A5...`</td></tr><tr><td>`"signature"`</td><td>string</td><td>required</td><td>Cryptographic signature</td><td>`5j1Vy9Uq...`</td></tr><tr><td>`"timestamp"`</td><td>integer</td><td>required</td><td>Current timestamp in milliseconds</td><td>`1716200000000`</td></tr><tr><td>`"installation_id"`</td><td>string</td><td>required</td><td>The browser's installation ID from [Register Web Push subscription](https://docs.pacifica.fi/api-documentation/api/rest-api/notifications/register-web-push-subscription.md)</td><td>`k3Jx9_Qm...`</td></tr><tr><td>`"expiry_window"`</td><td>integer</td><td>optional</td><td>Signature expiry in milliseconds</td><td>`30000`</td></tr><tr><td>`"agent_wallet"`</td><td>string</td><td>optional</td><td>Agent wallet address</td><td>`69trU9A5...`</td></tr></tbody></table>

```json theme={null}
{
  "account": "42trU9A5...",
  "signature": "5j1Vy9Uq...",
  "timestamp": 1716200000000,
  "installation_id": "k3Jx9_Qm2LpV7nRt4WcY8bZa1HdF6sGe",
  "expiry_window": 30000
}
```

Pacifica turns off only a subscription of the signing account. An unknown `installation_id` doesn't cause an error. After you unregister a subscription, [Get Web Push subscription status](https://docs.pacifica.fi/api-documentation/api/rest-api/notifications/get-web-push-subscription-status.md) returns `disabled`.

You can sign this request with the account key or with an [agent wallet](https://docs.pacifica.fi/api-documentation/api/signing/api-agent-keys.md).

#### Response

* Status 200: Subscription turned off

```json theme={null}
{
  "success": true,
  "data": null,
  "error": null,
  "code": null
}
```

* Status 400: Invalid request parameters or signature. A bad `installation_id` returns `error_id` `invalid_notification_device_id`
* Status 403: The account doesn't exist. An account exists after its first deposit
* Status 429: Rate limit exceeded
* Status 500: Internal server error

#### Code Example (Python)

```python theme={null}
import requests

payload = {
    "account": "42trU9A5...",
    "signature": "5j1Vy9Uq...",
    "timestamp": 1716200000000,
    "installation_id": "k3Jx9_Qm2LpV7nRt4WcY8bZa1HdF6sGe"
}

response = requests.post(
    "/api/v1/account/notifications/web_push/subscription/unregister",
    json=payload,
    headers={"Content-Type": "application/json"}
)

data = response.json()
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.