---
title: "Create a media protection rule"
method: POST
path: "/v2/sites/{site_id}/media_protection_rules/"
tags: ["media protection rules"]
---

# Create a media protection rule

`POST /v2/sites/{site_id}/media_protection_rules/`

Create a media protection rule

## Path parameters

- `site_id` string, required — Unique identifier for a resource

## Request body

- object
  - `metadata` MediaProtectionRuleResourceCreateMetadata — Metadata allowed when creating a media protection rule
    - `name` string, required — Name of the media protection rule A maximum of 64 characters is permitted.
    - `rule_type` RuleType, required — unresolved $ref
    - `countries` Countries, required — unresolved $ref

## Response `201`

Resource successfully created

- MediaProtectionRuleResourceRead — Resource for managing the individual media protection rules of an account
  - `schema` string
  - `id` string — Unique identifier for a resource
  - `created` string — Date and time at which the resource was created
  - `last_modified` string — Date and time at which the resource was most recently modified
  - `type` string — Name of the type of resource.
  - `relationships` object — Ancilliary resources associated to the primary resource being read
  - `metadata` MediaProtectionRuleResourceCreateMetadata — Metadata allowed when creating a media protection rule
    - `name` string, required — Name of the media protection rule A maximum of 64 characters is permitted.
    - `rule_type` RuleType, required — unresolved $ref
    - `countries` Countries, required — unresolved $ref

## Other responses

- `400` — Bad Request The request either lacks certain attributes or contains malformed/invalid attributes.

---

[API](https://skmtc.net/jwplayer/apis/management-api-v2.md) · [All operations](https://skmtc.net/jwplayer/apis/management-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/jwplayer/management-api-v2/revisions/180db7cada27/schema)
