---
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/`

## Request

- Base URL: `https://api.jwplayer.com`
- URL: `https://api.jwplayer.com/v2/sites/{site_id}/drm_policies/`
- Auth: API key in header `Authorization`

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`: Invalid JSON request body

## Changes

- **2026-11-03** `9fad6bd5872e`: 1 info
  - added the media type `application/json` for the response with the status `400`

[Operation history](https://skmtc.dev/jwplayer/apis/management-api-v2/changes/v2/sites/:site_id/drm_policies/post.md)

---

[API](https://skmtc.dev/jwplayer/apis/management-api-v2.md) - [All operations](https://skmtc.dev/jwplayer/apis/management-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/jwplayer/apis/management-api-v2/revisions/9fad6bd5872e?raw)
