# Playback Restrictions

> Video API reference, generated from the OpenAPI spec.

HTML version: https://www.mux.com/docs/api-reference/video/playback-restrictions. Full OpenAPI spec: https://www.mux.com/api-spec.json

## Update the Referrer Playback Restriction

`PUT https://api.mux.com/video/v1/playback-restrictions/{PLAYBACK_RESTRICTION_ID}/referrer`

Allows you to modify the list of domains or change how Mux validates playback requests without the `Referer` HTTP header. The Referrer restriction fully replaces the old list with this new list of domains.

Operation ID: `update-referrer-domain-restriction`. HTML version: https://www.mux.com/docs/api-reference/video/playback-restrictions/update-referrer-domain-restriction

### Path parameters

- `PLAYBACK_RESTRICTION_ID` (string, required): ID of the Playback Restriction.

### Request body

- `allowed_domains` (array of string, required): List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `["*"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `["*.example.com", "foo.com"]` A list of up to 10 domains or valid dns-style wildcards
- `allow_no_referrer` (boolean, default: false): A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests.

Example request body:

```json
{
  "allowed_domains": [
    "*.example.com"
  ],
  "allow_no_referrer": true
}
```

```sh
curl 'https://api.mux.com/video/v1/playback-restrictions/${PLAYBACK_RESTRICTION_ID}/referrer' \
  -X PUT \
  -d '{ "allowed_domains": ["*.example.com"], "allow_no_referrer": true }' \
  -H "Content-Type: application/json" \
  -u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}
```

### Response `200`

OK

- `data` (object, required)
  - `id` (string, required): Unique identifier for the Playback Restriction. Max 255 characters.
  - `created_at` (string, required, format: int64): Time the Playback Restriction was created, defined as a Unix timestamp (seconds since epoch).
  - `updated_at` (string, required, format: int64): Time the Playback Restriction was last updated, defined as a Unix timestamp (seconds since epoch).
  - `referrer` (object, required): A list of domains allowed to play your videos.
    - `allowed_domains` (array of string): List of domains allowed to play videos. Possible values are * `[]` Empty Array indicates deny video playback requests for all domains * `["*"]` A Single Wildcard `*` entry means allow video playback requests from any domain * `["*.example.com", "foo.com"]` A list of up to 10 domains or valid dns-style wildcards
    - `allow_no_referrer` (boolean, default: false): A boolean to determine whether to allow or deny HTTP requests without `Referer` HTTP request header. Playback requests coming from non-web/native applications like iOS, Android or smart TVs will not have a `Referer` HTTP header. Set this value to `true` to allow these playback requests.
  - `user_agent` (object, required): Rules that control what user agents are allowed to play your videos. Please see [Using User-Agent HTTP header for validation](https://docs.mux.com/guides/secure-video-playback#using-user-agent-http-header-for-validation) for more details on this feature.
    - `allow_no_user_agent` (boolean, default: true): Whether or not to allow views without a `User-Agent` HTTP request header.
    - `allow_high_risk_user_agent` (boolean, default: true): Whether or not to allow high risk user agents. The high risk user agents are defined by Mux.
