Create site

Prev Next

Available in Classic and VPC

Create a site.

Note
  • Site creation may take up to 24 hours from the creation date.
  • After site creation, you must switch it to the enabled status to issue a license.
  • For more information on integrating the Live Station service, see Create Live Station channel API.

Request

This section describes the request format. The method and URI are as follows:

Method URI
POST /api/v1/sites

Request headers

For information about the headers common to all One Click Multi DRM APIs, see One Click Multi DRM request headers.

Request body

You can include the following data in the body of your request:

Field Type Required Description
policyId Integer Required DRM policy ID
siteName String Required Site name
  • Enter 3 to 20 characters using a combination of English letters, numbers, and the special character "_".
fairPlayCert Object Optional FairPlay Streaming authentication information
  • Enter when using FairPlay DRM for content playback.
fairPlayCert.certFile String Optional FPS certificate
  • DER or CER file created on the Apple Developer Portal
  • Only HTTP URLs are supported.
fairPlayCert.privateKey String Optional Private key
  • PEM file
  • Only HTTP URLs are supported.
fairPlayCert.privateEncryptedString String Optional Passphrase for opening the private key file
fairPlayCert.secretKey String Optional Application Secret Key (ASK) string
  • Acquired simultaneously with FPS certificate generation

Request example

The request example is as follows:

curl --location --request POST 'https://multi-drm.apigw.ntruss.com/api/v1/sites' \
--header 'x-ncp-apigw-timestamp: {Timestamp}' \
--header 'x-ncp-iam-access-key: {Access Key}' \
--header 'x-ncp-apigw-signature-v2: {API Gateway Signature}' \
--header 'Content-Type: application/json' \
--header 'x-ncp-region_code: KR' \
--data '{
  "policyId": 0,
  "siteName": "myDrmSite",
  "fairPlayCert": {
    "certFile": "https://kr.object.ncloudstorage.com/sitebucket/myFairPlayCert.cer",
    "privateKey": "https://kr.object.ncloudstorage.com/sitebucket/myFairPlayCertPrivateKey.pem",
    "privateEncryptedString": "***********",
    "secretKey": "***********"
  }
}'

Response

This section describes the response format.

Response body

The response body includes the following data:

Field Type Required Description
success Boolean - API processing result
  • true | false
    • true: Succeeded
    • false: Failed
content Object - Site information
content.disabled Boolean - Whether Sub Account is disabled
  • true | false
    • true: Disabled
    • false: Enabled
content.siteId String - Site ID
content.siteName String - Site name
content.siteStatus String - Site status
  • CREATING | READY | RUNNING | DELETED
    • CREATING: Creating
    • READY: Available
    • RUNNING: In use
    • DELETED: Deleted
content.siteEnabledYn Boolean - Site activation status
  • true | false
    • true: Enabled
    • false: Disabled
content.policyId Integer - DRM policy ID
  • 0: Basic
content.fairPlayCert Object - FairPlay Streaming authentication information
content.fairPlayCert.certFile String - FPS certificate
  • DER or CER file created on the Apple Developer Portal
  • Only HTTP URLs are supported.
content.fairPlayCert.privateKey String - Private key
  • PEM file
  • Only HTTP URLs are supported.
content.fairPlayCert.privateEncryptedString String - Passphrase for opening the private key file
content.fairPlayCert.secretKey String - Application Secret Key (ASK) string
  • Acquired simultaneously with FPS certificate generation
content.statistics Object - Site statistics information
content.siteCreatedTime Integer - Site creation date and time (millisecond)
  • Unix timestamp format
content.siteUpdatedTime Integer - Site modification date and time (millisecond)
  • Unix timestamp format

Response status codes

For information about the response status codes common to all One Click Multi DRM APIs, see One Click Multi DRM response status codes.

Response example

The response example is as follows:

{
    "success": true,
    "content": {
        "disabled": false,
        "siteId": "drm-20250903141775-*****",
        "siteName": "myDrmSite",
        "siteStatus": "CREATING",
        "siteEnabledYn": false,
        "policyId": 0,
        "fairPlayCert": {
            "certFile": "myFairPlayCert.cer",
            "privateKey": "myFairPlayCertPrivateKey.pem",
            "privateEncryptedString": "***********",
            "secretKey": "***********"
        },
        "statistics": {},
        "siteCreatedTime": 1756876670519,
        "siteUpdatedTime": 1756876670519
    }
}