# Update a subscription

`PATCH` `https://goblins-call-api.onrender.com/v1/webhooks/:id`

Changes where a subscription delivers, which events it receives, or pauses it.

Needs a [workspace API key](https://www.cracklehq.com/docs/authentication).

## Path parameters

- `id` (string, required): The subscription’s ID, such as `wh_3f9a1c2b7d4e5f60`.

## Body

- `url` (string, optional): Where events are delivered, as a `POST` with a JSON body. Must be a public address.
- `events` (string[], optional, at least 1): The event types to receive, or `["*"]` for all of them.
- `description` (string, optional, up to 200 chars): A label for your own reference.
- `enabled` (boolean, optional, default true): `false` keeps the subscription without delivering to it.

## Errors

- `400`: The body failed validation. `details` lists each field and what is wrong with it.
- `400` `URL_NOT_ALLOWED`: The URL is not a public `http(s)` address.
- `404`: No subscription in your workspace has that ID.

Every request can also answer `401`, `429` and `500`: see [Errors](https://www.cracklehq.com/docs/errors).

## Notes

- The signing secret is fixed when the subscription is created. To change it, delete the subscription and create a new one.

Request:

cURL:

```bash
curl -X PATCH "https://goblins-call-api.onrender.com/v1/webhooks/wh_3f9a1c2b7d4e5f60" \
  -H "Authorization: Bearer $CRACKLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "events": [
    "call.started",
    "call.ended"
  ],
  "enabled": true
}'
```

Node.js:

```js
const response = await fetch('https://goblins-call-api.onrender.com/v1/webhooks/wh_3f9a1c2b7d4e5f60', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.CRACKLE_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    events: ['call.started', 'call.ended'],
    enabled: true,
  }),
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
```

Python:

```python
import os
import requests

response = requests.patch(
    "https://goblins-call-api.onrender.com/v1/webhooks/wh_3f9a1c2b7d4e5f60",
    headers={"Authorization": f"Bearer {os.environ['CRACKLE_API_KEY']}"},
    json={
        "events": ["call.started", "call.ended"],
        "enabled": True,
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
```

Response · 200 OK:

```json
{
  "webhook": {
    "id": "wh_3f9a1c2b7d4e5f60",
    "userId": "usr_8c1d2e3f4a5b",
    "url": "https://your-app.com/webhooks/crackle",
    "events": ["call.ended"],
    "enabled": true,
    "secret": "whsec_9c4f…a630",
    "createdAt": "2026-10-11T08:31:10.000Z",
    "updatedAt": "2026-10-11T08:31:10.000Z"
  }
}
```

Source: https://www.cracklehq.com/docs/reference/webhooks/update
