# 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

## Create a webhook

`POST https://api.mux.com/system/v1/webhooks`

Creates a new webhook for the current environment. New webhooks start out enabled. The `address` must be unique among the environment's webhooks. **The `signing_secret` is only returned in this response and cannot be retrieved again.** Store it securely and use it to verify that webhook payloads were sent by Mux.

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

### Request body

- `address` (string, required): The URL where Mux should send webhook notifications. Must be unique among the environment's webhooks.

Example request body:

```json
{
  "address": "https://example.com/webhook"
}
```

### Response `201`

Created

- `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`: A webhook with this address already exists in this environment

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
