
# Enable and Disable Webhooks

Webhooks can be temporarily disabled without deleting their configuration. This is useful for maintenance, debugging, or when you need to pause notifications temporarily.

## Disabling a Webhook

Send a POST request to `/webhooks/{uuid}/disable`:

```
POST https://api.dnsradar.dev/webhooks/wh_abc123/disable
```

The webhook is immediately disabled and stops receiving notifications.

## Enabling a Webhook

Send a POST request to `/webhooks/{uuid}/enable`:

```
POST https://api.dnsradar.dev/webhooks/wh_abc123/enable
```

The webhook is re-enabled and resumes receiving notifications. Any error states are cleared.

## API Response

Both endpoints return the updated webhook object:

```json
{
  "uuid": "wh_abc123",
  "created": "2026-01-08T10:30:00Z",
  "url": "https://api.service.com/webhooks/dnsradar",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer token123"
  },
  "is_active": false,
  "last_error": null,
  "last_executed": "2026-01-08T15:22:10Z"
}
```

Note the `is_active` field reflects the webhook's current state.


## Automatic Disabling

DNSRadar automatically disables webhooks after repeated failures:

> ⚠️ **WARNING:** **Auto-Disable**: Webhooks are automatically disabled after 9 failed retry attempts over 24 hours. You'll be notified when this happens.

### Re-enabling After Auto-Disable

When a webhook is auto-disabled:

1. Fix the underlying issue (endpoint availability, authentication, etc.)
2. Use the enable endpoint to reactivate
3. The `last_error` field is cleared upon re-enabling

```
POST https://api.dnsradar.dev/webhooks/wh_abc123/enable
```

## Checking Webhook Status

### Via API

Get webhook details to check status:
```
GET https://api.dnsradar.dev/webhooks/wh_abc123
```

And ensure that the response's body contains the appropriate `is_active` property, set to `true`.


## Next Steps

- [Understand Webhook Retries](/docs/webhook-retries)
- [View Webhook Request History](/docs/webhook-requests)
- [Enable/Disable Monitors](/docs/enable-disable-monitors)
