# How to Update or Unsubscribe a Webhook

## List Your Subscriptions

Before updating or removing a subscription you need its `id` and `client_id`. Both are returned in the subscription list:

```
GET /apps/subscriptions
```

**Query parameters (all optional):**

| Parameter | Default | Description |
| --------- | ------- | ----------- |
| `skip` | `0` | Number of results to skip (for pagination). |
| `limit` | `100` | Max results per page (max `100`). |
| `direction` | `newer` | Pagination direction: `newer` or `older`. |
| `date` | — | ISO 8601 cursor date for pagination. |

**Response:** A paginated list of subscription objects. Each object contains an `id` you use in the update and delete calls below.

---

## Update a Subscription

Replace the events, filters, or webhook URL for a specific subscription in place.

```
PUT /apps/{client_id}/subscriptions/{id}
Content-Type: application/json
```

**Path parameters:**

| Parameter | Description |
| --------- | ----------- |
| `client_id` | The `client_id` of the app this subscription belongs to. |
| `id` | The subscription `id` returned when you created it (or from `GET /apps/subscriptions`). |

**Request body** — same fields as `POST /apps/subscribe`. Only include the fields you want to change; omitted fields retain their current values.

```json
{
  "subscriptions": ["message.posted.to.channel"],
  "subscription_filters": [
    {
      "key": "creator_id",
      "value": "<your_user_guid>",
      "operator": "ne"
    }
  ],
  "webhookURL": "https://your-endpoint.example.com/webhook"
}
```

**Response:** The updated subscription object.

---

## Unsubscribe a Single Subscription

Delete one specific subscription by its `id`. Use this when you subscribed with `one_per_subscription` mode and want to remove a single entry without affecting others.

```
DELETE /apps/{client_id}/unsubscribe/{id}
```

**Path parameters:**

| Parameter | Description |
| --------- | ----------- |
| `client_id` | The `client_id` of the app. |
| `id` | The subscription `id` to remove. |

**Response:** `204 No Content`

---

## Unsubscribe from All Subscriptions for an App

Remove all subscriptions for the authenticated user under a given app and revoke all associated access tokens. Use this for a full disconnect / logout from an app.

```
DELETE /apps/{client_id}/unsubscribe
```

**Path parameter:**

| Parameter | Description |
| --------- | ----------- |
| `client_id` | The `client_id` of the app to fully disconnect from. |

**Response:** `204 No Content`

---

## Which Endpoint to Use

| Goal | Endpoint |
| ---- | -------- |
| Change events or filters without recreating the subscription | `PUT /apps/{client_id}/subscriptions/{id}` |
| Remove one subscription (Zapier-style, one-per-subscription apps) | `DELETE /apps/{client_id}/unsubscribe/{id}` |
| Remove all subscriptions and revoke app access entirely | `DELETE /apps/{client_id}/unsubscribe` |

For `one_per_client` apps (one shared webhook URL per app), calling `POST /apps/subscribe` again with the new configuration is the simplest way to update — it upserts the existing subscription in place. See [how-to-register-for-webhooks.md](./how-to-register-for-webhooks.md) for details.
