DRM-X 6.0 dove and olive branch logoDRM-X 6.0Docs

Create a playback session

Request and consume the DRM-X Universal Playback Session Contract with authentication, trusted Content IDs, and bounded authorization.

View MarkdownLive examples ↗Updated 2026-09-05
Your backend decides access; DRM-X enforces the signed policy. Encrypted media and DRM licenses follow separate delivery paths.
Your backend decides access; DRM-X enforces the signed policy. Encrypted media and DRM licenses follow separate delivery paths.
API

Create a Universal Playback Session#

POST https://api6.drm-x.com/api/v1/playback/environments/{siteId}/sessions
Accept: application/json
Content-Type: application/json
X-DRMX-Client-Id: {siteKey}
X-DRMX-Client-Secret: {accessKey}
{
  "contentId": "course-12-lesson-4",
  "contentType": "vod",
  "drmSystem": "widevine",
  "subject": "customer-user-1001",
  "sessionId": "new-unpredictable-id-per-playback",
  "playbackMode": "streaming",
  "licensePolicyTemplate": "multi-tier-standard",
  "useEnvironmentDefaults": true,
  "applicationId": "customer-web",
  "platformCapabilities": {
    "clientPlatform": "web",
    "drmSystems": ["widevine"],
    "manifestTypes": ["dash"],
    "maximumHeight": 2160,
    "persistentState": false,
    "sdkVersion": "1.1.0-preview.13"
  }
}

A successful Contract v1 response includes the authoritative manifest, available manifest variants, a DRM-specific license URL, a short-lived DRM License Token or customer proxy authorization, a release route, the licensed maximum height, and allowed tracks. Return it with Cache-Control: no-store.

Use one unpredictable session ID for each real playback attempt. Reusing an ID across devices defeats concurrent-stream counting.

Authentication and trusted request fields#

Call this API from your backend with a project API client that has license-tokens:create. Use the environment UUID as siteId. Your authenticated viewer calls your endpoint; your endpoint supplies the trusted fields below.

FieldMeaningIntegration rule
contentIdThe published content referenceResolve from your trusted catalog after the entitlement check.
subjectYour stable viewer identifierDerive from the authenticated session, not a client-supplied user ID.
drmSystemwidevine, playready, fairplay, or wiseplayMatch the selected DRM to the player capabilities.
sessionIdIdentity of this playback attemptGenerate a fresh unpredictable value for each attempt.
contentTypevod or liveUse the type registered for the content.
playbackModestreaming in Contract v1Offline playback requires a later contract extension.
licensePolicyTemplate / licensePolicyA named policy or custom policySelect on your server; do not supply both. See policy rules.
platformCapabilitiesPlatform, DRM systems, manifest types, and device hintsSend explicit capabilities with new integrations. They describe the client; they do not override license policy.

Consume the response descriptors#

Use the nested Contract v1 descriptors. Do not construct license URLs from guesses or replace registered manifest URLs with player inputs.

Response fieldHow to use it
contractVersionVerify that the returned contract version is supported by your integration.
manifestUrl / manifestUrlsLoad the authoritative selected manifest or a returned compatible variant.
expiresAtThe expiry of this bounded authorization.
drmRead system, licenseServerUrl, drmLicenseToken, tokenType, and the optional fairPlayCertificateUrl. A customer token proxy can replace the browser-facing authorization with its own bounded session.
releaseUse its url, method, and authorizationScheme to release the session when playback ends.
policyHonor maximumHeight and allowedTrackTypes. The provider still enforces the signed policy.
tracksRead audio/subtitle language-selection capability and the language-tag standard.

Return your player response with Cache-Control: no-store. Never forward the project Access Key to the browser. Restrict authorization headers to the returned license and certificate routes.

Handle errors and release reservations#

Inspect the HTTP status and machine-readable code. Retain the requestId for troubleshooting and respect retryable; a denied entitlement or invalid policy needs a corrected decision, not a retry loop. See the playback session error reference.

Release the reservation on Stop, playback replacement, terminal errors, and application shutdown. A fresh playback attempt gets a new session ID.