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

# Update Webhook

> Update endpoint URL, subscribed event topics, or enabled status for a webhook.

Update destination URL or modify which email delivery events trigger webhooks via the Mailofly API.

### Path Parameters

**id** `string` *required*

The unique identifier of the webhook.

### Body Parameters

**url** `string`

New destination HTTPS endpoint URL.

**events** `array`

Updated array of event topics to subscribe to (e.g. `["email.sent", "email.delivered", "email.bounced"]`).

**enabled** `boolean`

Enable or temporarily pause webhook deliveries.

### Response

**data** `object`

**id** `string`

Webhook ID.

**url** `string`

Updated URL.

**events** `array`

Subscribed events.

**enabled** `boolean`

Enabled status.

```bash cURL theme={null}
curl -X PATCH https://api.mailofly.com/webhooks/wh_123 \
  -H "Authorization: Bearer mf_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "events": ["email.delivered", "email.bounced", "email.complained"]
  }'
```

```json 200 OK theme={null}
{
  "data": {
    "id": "wh_123",
    "url": "https://api.example.com/webhooks",
    "events": ["email.delivered", "email.bounced", "email.complained"],
    "enabled": true
  }
}
```


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