Create a DRM Encoding Profile
Including fairplay in key_systems requires this service to already have an active FairPlay certificate uploaded - the request is rejected otherwise.
curl -X POST "https://api.5centscdn.com/v2/drm/profiles/new" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
]
}'
import requests
import json
url = "https://api.5centscdn.com/v2/drm/profiles/new"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/drm/profiles/new", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
]
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/drm/profiles/new", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/drm/profiles/new')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request.body = '{
"_METHOD": "PUT",
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
]
}'
response = http.request(request)
puts response.body
{
"result": "success",
"id": 7,
"serviceid": 10001,
"name": "Widevine + PlayReady HD/SD",
"key_mode": "hd_sd",
"hd_height_threshold": 720,
"key_systems": [
"widevine",
"playready"
],
"protection_scheme": "cbcs",
"created_at": "2026-09-22 12:10:00",
"updated_at": "2026-09-22 12:10:00"
}
/drm/profiles/new
Target server for requests. Edit to use your own host.
API key (sent in header)
The media type of the request body
Must be set to PUT to trigger DRM Encoding Profile creation.
Friendly name of the profile.
Key-splitting mode. single uses one key for the whole asset, hd_sd uses one key at/above hd_height_threshold and one below, per_rendition uses a separate key per quality tier (SD/HD/HD2/UHD).
Pixel height threshold used by the hd_sd and per_rendition key modes. Defaults to 720.
DRM systems to enable. At least one value is required. fairplay requires an active FairPlay certificate on this service.
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
Key-splitting mode. single uses one key for the whole asset, hd_sd uses one key at/above hd_height_threshold and one below, per_rendition uses a separate key per quality tier (SD/HD/HD2/UHD).
singlehd_sdper_renditionPixel height threshold used by the hd_sd and per_rendition key modes. Defaults to 720.
720DRM systems to enable. At least one value is required. fairplay requires an active FairPlay certificate on this service.
["widevine","playready"]Responses
Operation outcome. Returns error on validation failure.
successerrorUnique identifier of the newly created DRM Encoding Profile.
Service account identifier that owns this profile.
Friendly name of the profile.
Key-splitting mode.
singlehd_sdper_renditionPixel height threshold used by the hd_sd and per_rendition key modes.
DRM systems enabled for assets encoded with this profile.
widevineplayreadyfairplaywiseplayCommon Encryption protection scheme applied to the content.
cbcsProfile creation timestamp.
Profile last-update timestamp.