# Webhooks

> System API reference, generated from the OpenAPI spec.

HTML version: https://www.mux.com/docs/api-reference/system/webhooks. Full OpenAPI spec: https://www.mux.com/api-spec.json

## Update a webhook

`PATCH https://api.mux.com/system/v1/webhooks/{WEBHOOK_ID}`

Updates the address and/or enabled status of an existing webhook. Omitted fields are left unchanged; at least one of `address` or `enabled` must be provided. The new `address` must be unique among the environment's webhooks.

Operation ID: `update-webhook`. HTML version: https://www.mux.com/docs/api-reference/system/webhooks/update-webhook

### Path parameters

- `WEBHOOK_ID` (string, required): The ID of the webhook.

### Request body

- `address` (string): The URL where Mux should send webhook notifications. Must be unique among the environment's webhooks.
- `enabled` (boolean): Whether Mux attempts to deliver notifications to this webhook.

Example request body:

```json
{
  "address": "https://example.com/new-webhook",
  "enabled": false
}
```

### Response `200`

OK

- `data` (object)
  - `id` (string, required): Unique identifier for the webhook.
  - `address` (string, required): The URL where Mux sends webhook notifications.
  - `enabled` (boolean, required): Whether Mux attempts to deliver notifications to this webhook.
  - `created_at` (string, required, format: date-time): Time at which the webhook was created, as an ISO 8601 UTC datetime.
  - `signing_secret` (string): Secret used to verify that webhook payloads were sent by Mux. **Note that this value is only returned once when creating a webhook.**

### Errors

- `400`: No update fields provided, or a webhook with this address already exists in this environment
- `404`: Webhook not found

Every error response has this body:

- `error` (object, required)
  - `type` (string, required): The type of the error
  - `messages` (array of string, required): Friendly messages of errors encountered
