FairPlay CertificateUpload a FairPlay certificate

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"
}'
{
  "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"
}
POST
/drm/fairplay-cert/new
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

Content-Typestring
Required

The media type of the request body

Options: application/json
_METHODstring
Required

Must be set to PUT to trigger FairPlay certificate upload.

descriptionstring
Required

Friendly description of the certificate.

certificatestring
Required

PEM-encoded X.509 FairPlay certificate.

privateKeystring
Required

PEM-encoded, unencrypted private key. Forwarded to DRMtoday and never persisted.

provisioningDatastring
Required

Hex-encoded Application Secret Key (ASK).

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Body

application/json
_METHODstring
Required

Must be set to PUT to trigger FairPlay certificate upload.

Example:
PUT
descriptionstring
Required

Friendly description of the certificate.

Example:
FairPlay production certificate 2026
certificatestring
Required

PEM-encoded X.509 FairPlay certificate.

Example:
YOUR_PEM_CERTIFICATE
privateKeystring
Required

PEM-encoded, unencrypted private key. Forwarded to DRMtoday and never persisted.

Example:
YOUR_PEM_PRIVATE_KEY
provisioningDatastring
Required

Hex-encoded Application Secret Key (ASK).

Example:
YOUR_HEX_APPLICATION_SECRET_KEY

Responses

resultstring

Operation outcome. Returns error on validation failure.

Allowed values:successerror
messagestring

Human-readable error message. Only present when result is error.

idinteger

Unique identifier of the FairPlay certificate record.

serviceidinteger

Service account identifier that owns this certificate.

drmtoday_cert_idstring

Certificate ID assigned by DRMtoday.

cert_hashstring

Hash of the uploaded certificate, as reported by DRMtoday.

descriptionstring

Friendly description of the certificate.

enabledboolean

True if this is the currently active certificate.

uploaded_atstring

Time the certificate was uploaded to DRMtoday.

created_atstring

Record creation timestamp.

updated_atstring

Record last-update timestamp.