Upload a FairPlay certificate
Pass-through only - the certificate, private key and provisioning data are validated, forwarded to DRMtoday and discarded. Only DRMtoday's returned metadata is persisted, never the key material. Uploading a new certificate disables any previously active certificate for this service.
curl -X POST "https://api.5centscdn.com/v2/drm/fairplay-cert/new" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"_METHOD": "PUT",
"description": "FairPlay production certificate 2026",
"certificate": "YOUR_PEM_CERTIFICATE",
"privateKey": "YOUR_PEM_PRIVATE_KEY",
"provisioningData": "YOUR_HEX_APPLICATION_SECRET_KEY"
}'
import requests
import json
url = "https://api.5centscdn.com/v2/drm/fairplay-cert/new"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
data = {
"_METHOD": "PUT",
"description": "FairPlay production certificate 2026",
"certificate": "YOUR_PEM_CERTIFICATE",
"privateKey": "YOUR_PEM_PRIVATE_KEY",
"provisioningData": "YOUR_HEX_APPLICATION_SECRET_KEY"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/drm/fairplay-cert/new", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"_METHOD": "PUT",
"description": "FairPlay production certificate 2026",
"certificate": "YOUR_PEM_CERTIFICATE",
"privateKey": "YOUR_PEM_PRIVATE_KEY",
"provisioningData": "YOUR_HEX_APPLICATION_SECRET_KEY"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"_METHOD": "PUT",
"description": "FairPlay production certificate 2026",
"certificate": "YOUR_PEM_CERTIFICATE",
"privateKey": "YOUR_PEM_PRIVATE_KEY",
"provisioningData": "YOUR_HEX_APPLICATION_SECRET_KEY"
}`)
req, err := http.NewRequest("POST", "https://api.5centscdn.com/v2/drm/fairplay-cert/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/fairplay-cert/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",
"description": "FairPlay production certificate 2026",
"certificate": "YOUR_PEM_CERTIFICATE",
"privateKey": "YOUR_PEM_PRIVATE_KEY",
"provisioningData": "YOUR_HEX_APPLICATION_SECRET_KEY"
}'
response = http.request(request)
puts response.body
{
"result": "success",
"message": "Certificate must be a PEM-encoded X.509 certificate (-----BEGIN CERTIFICATE-----).",
"id": 3,
"serviceid": 10001,
"drmtoday_cert_id": "9f1c2a7e-5b3d-4c8e-a1f0-6d2b7e9c4a10",
"cert_hash": "3a7bd3e2360a3d29eea436fcfb7e44c735d117c4",
"description": "FairPlay production certificate 2026",
"enabled": true,
"uploaded_at": "2026-09-22 12:20:45",
"created_at": "2026-09-22 12:20:45",
"updated_at": "2026-09-22 12:20:45"
}
/drm/fairplay-cert/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 FairPlay certificate upload.
Friendly description of the certificate.
PEM-encoded X.509 FairPlay certificate.
PEM-encoded, unencrypted private key. Forwarded to DRMtoday and never persisted.
Hex-encoded Application Secret Key (ASK).
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Body
Friendly description of the certificate.
FairPlay production certificate 2026PEM-encoded, unencrypted private key. Forwarded to DRMtoday and never persisted.
YOUR_PEM_PRIVATE_KEYHex-encoded Application Secret Key (ASK).
YOUR_HEX_APPLICATION_SECRET_KEYResponses
Operation outcome. Returns error on validation failure.
successerrorHuman-readable error message. Only present when result is error.
Unique identifier of the FairPlay certificate record.
Service account identifier that owns this certificate.
Certificate ID assigned by DRMtoday.
Hash of the uploaded certificate, as reported by DRMtoday.
Friendly description of the certificate.
True if this is the currently active certificate.
Time the certificate was uploaded to DRMtoday.
Record creation timestamp.
Record last-update timestamp.