Create a new playlist

This endpoint creates a new playlist within a specified workspace. A playlist acts as a container for organizing media items either manually or based on filters and metadata. <br> <br> ### Playlists can be created in two modes - **Manual:** Creates an empty playlist without any initial media items. Use this mode for manual curation, where you add items later in a user-defined sequence. - **Smart:** Auto-populates the playlist at creation time based on the filter criteria (for example, a video creation date range) that you provide in the request. For more details, see <a href="https://docs.fastpix.io/docs/create-and-manage-playlist">Create and manage playlist</a>. #### How it works - When you send a `POST` request to this endpoint, FastPix creates a playlist and returns a playlist ID, using which items can be added later in a user-defined sequence. - You can create a smart playlist that is auto-populated based on the metadata in the request body. #### Example An e-learning platform creates a new playlist titled Beginner Python Series through the API. The response returns a unique playlist ID. The platform uses this ID to add a series of video tutorials to the playlist in a defined order. The playlist appears on the frontend as a structured learning path for learners.

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>

Request

This endpoint expects an object.
namestringRequiredDefaults to Playlist name
Name of the playlist.
referenceIdstringRequiredDefaults to a1
Unique string value assigned by user to the playlist.
typeenumRequiredDefaults to smart
For a smart playlist metadata is required.
descriptionstringOptionalDefaults to This is a playlist

Description for a playlist (Optional).

playOrderenumOptionalDefaults to createdDate DESC
Determines the insertion order of media into playlist.
limitintegerOptionalDefaults to 1000
Optional parameter to limit no. of media in a playlist.
metadataobjectOptional

Required when the playlist type is smart. Media created between startDate and endDate of createdDate is added. Optionally, you can include media based on updatedDate.

Response

Playlist created successfully
successboolean
Shows the request status. Returns true for success and false for failure.
dataobject
Displays the result of the request.