> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mailofly.com/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.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique identifier of the webhook.
</ParamField>

### Body Parameters

<ParamField body="url" type="string">
  New destination HTTPS endpoint URL.
</ParamField>

<ParamField body="events" type="array">
  Updated array of event topics to subscribe to (e.g. `["email.sent", "email.delivered", "email.bounced"]`).
</ParamField>

<ParamField body="enabled" type="boolean">
  Enable or temporarily pause webhook deliveries.
</ParamField>

### Response

<ResponseField name="data" type="object">
  <ResponseField name="id" type="string">Webhook ID.</ResponseField>
  <ResponseField name="url" type="string">Updated URL.</ResponseField>
  <ResponseField name="events" type="array">Subscribed events.</ResponseField>
  <ResponseField name="enabled" type="boolean">Enabled status.</ResponseField>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X PATCH https://api.mailofly.com/api/v1/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"]
    }'
  ```
</RequestExample>

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


## Related topics

- [Delete Webhook](/api/webhooks/delete-webhook.md)
- [List Webhooks](/api/webhooks/list-webhooks.md)
- [Create Webhook](/api/webhooks/create-webhook.md)
- [Retrieve Webhook](/api/webhooks/retrieve-webhook.md)
- [Configure webhook](/receiving/configure-webhook.md)
