# Update a subscription

Source: https://help.ruuster.com/api/webhooks-update

```http
PATCH https://api.ruuster.com/v1/webhooks/{webhookId}
```

Change a subscription's URL, events, description, or pause and re-activate it.

- Authentication: `x-api-key` and `x-email` headers of an owner or admin
- Rate limit: 120 requests per minute per key
- Changes only your webhook subscriptions, never your Ruuster data

Send only the fields you're changing.

## Path parameters

| Name | Type | Description |
|---|---|---|
| `webhookId` | string | The subscription id, `whk_…` |

## Body

JSON, `Content-Type: application/json`, at most 64 KB.

| Name | Type | Required | Description |
|---|---|---|---|
| `url` | string | no | New delivery URL; same rules as on create |
| `events` | string[] | no | Replaces the event list |
| `description` | string | no | Your label |
| `status` | string | no | `active` or `paused`. Set `active` to re-enable a `disabled` subscription after fixing your endpoint, then [replay](https://help.ruuster.com/api/webhooks-replay) the gap |

A `blocked` subscription can only be re-enabled by Ruuster (`409 subscription_blocked`).

## Response

`data.subscription` with the changes applied.

## Example request

cURL:

```bash
curl -s -X PATCH "https://api.ruuster.com/v1/webhooks/whk_2c7f9a4e1b" \
  -H "x-api-key: $RUUSTER_API_KEY" \
  -H "x-email: $RUUSTER_EMAIL" \
  -H "Content-Type: application/json" \
  -d '{"events":["lead.*"],"status":"paused"}'
```

Node.js:

```javascript
const res = await fetch("https://api.ruuster.com/v1/webhooks/whk_2c7f9a4e1b", {
  method: "PATCH",
  headers: {
    "x-api-key": process.env.RUUSTER_API_KEY,
    "x-email": process.env.RUUSTER_EMAIL,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "events": [
      "lead.*"
    ],
    "status": "paused"
  }),
});
const body = await res.json();
if (!body.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.requestId})`);
console.log(body.data);
```

Python:

```python
import os
import requests

res = requests.patch(
    "https://api.ruuster.com/v1/webhooks/whk_2c7f9a4e1b",
    headers={"x-api-key": os.environ["RUUSTER_API_KEY"], "x-email": os.environ["RUUSTER_EMAIL"]},
    json={
        "events": ["lead.*"],
        "status": "paused",
    },
    timeout=30,
)
body = res.json()
if not body["ok"]:
    raise RuntimeError(f'{body["error"]["code"]}: {body["error"]["message"]} ({body.get("requestId")})')
print(body["data"])
```

## Example response

```json
{ "ok": true, "data": { "subscription": { "id": "whk_2c7f9a4e1b", "events": ["lead.*"], "status": "paused", "updatedAt": "2026-10-01T16:02:44Z", "…": "other fields unchanged" } } }
```
