Customer Rights TokenCreate a CRT template

Create a CRT template

curl -X POST "https://api.5centscdn.com/v2/drm/crt-templates/new" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "_METHOD": "PUT",
  "name": "rental-relative-expiration",
  "description": "Expires 7 days after issuance; playback must finish within 48 hours.",
  "tags": [
    "profile",
    "rental"
  ],
  "template": {
    "storeLicense": true,
    "profile": {
      "type": "rental",
      "relativeExpiration": "P7D",
      "playDuration": "PT48H"
    }
  }
}'
{
  "result": "success",
  "uuid": "c3d9a1e4-7b2f-4e6a-9d8c-5f1b0a2e7c34",
  "name": "rental-relative-expiration",
  "description": "Expires 7 days after issuance; playback must finish within 48 hours.",
  "tags": [
    "profile",
    "rental"
  ],
  "template": {
    "profile": {
      "type": "rental",
      "relativeExpiration": "PT168H",
      "playDuration": "PT48H"
    },
    "storeLicense": true
  }
}
POST
/drm/crt-templates/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 CRT template creation.

namestring

Optional short name of the template.

descriptionstring
Required

Description of the template.

tagsarray

Optional free-form tags for organizing templates.

templateobject
Required

CRT claim-shape object merged into every CRT signed against this template.

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 CRT template creation.

Example:
PUT
namestring

Optional short name of the template.

Example:
rental-relative-expiration
descriptionstring
Required

Description of the template.

Example:
Expires 7 days after issuance; playback must finish within 48 hours.
tagsarray

Optional free-form tags for organizing templates.

Example:
["profile","rental"]
templateobject
Required

CRT claim-shape object merged into every CRT signed against this template.

Example:
{"storeLicense":true,"profile":{"type":"rental","relativeExpiration":"P7D","playDuration":"PT48H"}}

Responses

resultstring

Operation outcome. Returns error on validation failure.

Allowed values:successerror
uuidstring

Unique identifier of the newly created CRT template.

namestring

Short name of the template.

descriptionstring

Description of the template.

tagsstring[]

Free-form tags for organizing templates. Omitted when the template has no tags.

templateobject

CRT claim-shape object merged into every CRT signed against this template.