# Update webhook

> Changes the URL or events, or pauses the endpoint.

Source: https://mailvina.com/docs/api-reference/webhooks/update-webhook · Base URL: https://api.mailvina.com · Guide: https://mailvina.com/docs/webhooks

`PATCH /webhooks/:id`

**Path parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The webhook ID. |

**Body parameters**

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | `string` | no | New URL. |
| `events` | `string[]` | no | New event list. |
| `active` | `boolean` | no | `false` pauses deliveries. |

**Request**

```bash
curl -X PATCH 'https://api.mailvina.com/webhooks/:id' \
  -H 'Authorization: Bearer mv_xxxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{
  "active": false
}'
```

```js
const res = await fetch('https://api.mailvina.com/webhooks/:id', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.MAILVINA_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "active": false
  }),
});
const data = await res.json();
```

```python
import os, requests

res = requests.patch(
    "https://api.mailvina.com/webhooks/:id",
    headers={"Authorization": f"Bearer {os.environ['MAILVINA_API_KEY']}"},
    json={
        "active": False
    },
)
print(res.json())
```

**Response**

```json
{
  "object": "webhook",
  "id": "a1f9c1d2-7d3e-4b8f-9a0c-2e5b6d7f8a90"
}
```
