Skip to Content
Create a playback ID
post

Creates a playback ID that can be used to stream the asset to a viewer.

curl https://api.mux.com/video/v1/assets/${ASSET_ID}/playback-ids \
  -X POST \
  -d '{ "policy": "public" }' \
  -H "Content-Type: application/json" \
  -u ${MUX_TOKEN_ID}:${MUX_TOKEN_SECRET}
Request body params
policy
string
Possible values: "public""signed""drm"
  • public playback IDs are accessible by constructing an HLS URL like https://stream.mux.com/${PLAYBACK_ID}

  • signed playback IDs should be used with tokens https://stream.mux.com/${PLAYBACK_ID}?token={TOKEN}. See Secure video playback for details about creating tokens.

  • drm playback IDs are protected with DRM technologies. See DRM documentation for more details.

drm_configuration_id
string

The DRM configuration used by this playback ID. Must only be set when policy is set to drm.

Request path & query params
ASSET_ID
string

The asset ID.

post
201
/video/v1/assets/{ASSET_ID}/playback-ids
Request
(application/json)
{
  "policy": "public"
}
Response
(application/json)
{
  "data": {
    "policy": "public",
    "id": "Lj02VZDorh9hCV00flNqPli8fmwf6KEppug01w8zDEYVlQ"
  }
}