---
title: "Creates a DRM policy"
method: POST
path: "/v2/sites/{site_id}/drm_policies/"
tags: ["drm"]
---

# Creates a DRM policy

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

Creates a DRM policy for a site

## Path parameters

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

## Request body

- object
  - `metadata` object
    - `name` string, required — Common name for the DRM policy A maximum of 50 characters is permitted.
    - `max_width` integer, required — Max rendition width the DRM policy allows to be streamed
    - `widevine_security` 'hw_secure_all' | 'hw_secure_crypto' | 'hw_secure_decode' | 'sw_secure_crypto' | 'sw_secure_decode', required
    - `playready_security` 2000 | 3000, required
    - `allow_offline_persistence` boolean, required — Whether DRM policy allows content to be stored on devices and played back offline
    - `digital_output_protection` 'never_allowed' | 'not_required' | 'require_hdcp_v1' | 'require_hdcp_v2' | 'require_hdcp_v2.1' | 'require_hdcp_v2.2', required — HDCP requirement
    - `license_duration` integer, required — Length of time in seconds for which the license is valid
    - `playback_duration` integer, required — Length of time in seconds for which playback is supported

## Response `200`

DRM policy created successfully

- DRMPolicyResourceRead — Resource for managing the individual DRM policies of a site
  - `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` DRMPolicyMetadata
    - `name` string — Common name for the DRM policy A maximum of 50 characters is permitted.
    - `max_width` integer — Max rendition width the DRM policy allows to be streamed
    - `widevine_security` 'hw_secure_all' | 'hw_secure_crypto' | 'hw_secure_decode' | 'sw_secure_crypto' | 'sw_secure_decode'
    - `playready_security` 2000 | 3000
    - `allow_offline_persistence` boolean — Whether DRM policy allows content to be stored on devices and played back offline
    - `digital_output_protection` 'never_allowed' | 'not_required' | 'require_hdcp_v1' | 'require_hdcp_v2' | 'require_hdcp_v2.1' | 'require_hdcp_v2.2' — HDCP requirement
    - `license_duration` integer — Length of time in seconds for which the license is valid
    - `playback_duration` integer — Length of time in seconds for which playback is supported

## 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)
