Create a playback ID

You can create a new playback ID for a specific media asset. If you have already retrieved an existing `playbackId` using the <a href="https://docs.fastpix.io/reference/get-media">Get Media by ID</a> endpoint for a media asset, you can use this endpoint to generate a new playback ID with a specified access policy. If you want to create a private playback ID for a media asset that already has a public playback ID, this endpoint also allows you to do so by specifying the desired access policy. #### How it works 1. Make a `POST` request to this endpoint, replacing `<mediaId>` with the `uploadId` or `id` of the media asset. 2. Include the `accessPolicy` in the request body with `private` or `public` as the value. 3. You receive a response containing the newly created playback ID with the specified access level. #### Example A video streaming service generates playback IDs for each media file when users request to view specific content. The video player then uses the playback ID to stream the video.

Authentication

AuthorizationBasic
FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. - <b>Username:</b> Access Token ID - <b>Password:</b> Secret Key Activate your FastPix account to generate your API credentials. <a href="https://docs.fastpix.io/docs/activate-account" target="_blank">See the guide here</a>

Path parameters

mediaIdstringRequiredformat: "uuid"
The unique identifier assigned to the media when created. The value must be a valid UUID.

Request

Request body for creating playback id for an media
accessPolicyenumRequired
Access policy for media content
Allowed values:
accessRestrictionsobjectOptional
drmConfigurationIdstringOptionalformat: "uuid"

DRM configuration ID (required if accessPolicy is “drm”)

resolutionenumOptional
The maximum resolution for the playback ID.
Allowed values:

Response

Playback ID for a media content.
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject
A collection of Playback ID objects utilized for crafting HLS playback urls.