---
title: "Create playlist"
method: POST
path: "/streaming/playlists"
tags: ["Playlists"]
---

# Create playlist

`POST /streaming/playlists`

Playlist is a curated collection of video content organized in a sequential manner. 


This method offers several advantages and features that are typical of live streaming but with more control over the content. Here's how it works:
- Playlist always consists only of static VOD videos you previously uploaded to the system.
- Playlist is always played as a "Live stream" for end-users, so without the ability to fast forward the stream to the “future”. Manifest will contain chunks as for live stream too.
- Playlist can be looped endlessly. In this case, all the videos in the list will be constantly repeated through the list.
- Playlist can be programmed to be played at a specific time in the future. In that case, before the start time there will be empty manifest.


You can add new videos to the list, remove unnecessary videos, or change the order of videos in the list.
But please pay attention to when the video list changes, it is updated instantly on the server. This means that after saving the changed list, the playlist will be reloaded for all users and it will start plays from the very first element.

Maximum video limit = 128 videos in a row. 

  


Examples of usage:
- Looped video playback
- Scheduled playback

**Looped video playback**

It can be used to simulate TV channel pre-programmed behaviour.

- Selection: Choose a series of videos, such as TV show episodes, movies, tutorials, or any other relevant content.
- Order: Arrange the selected videos in the desired sequence, much like setting a broadcast schedule.
- Looping: Optionally, the playlist can be set to loop, replaying the sequence once it finishes to maintain a continuous stream.

Example:

```
  active: true
  loop: true
  name: "Playlist: TV channel 'The world around us' (Programmed broadcast for 24 hours)"
```


**Scheduled playback**

It can be used to simulate live events such as virtual concerts, webinars, or any special broadcasts without the logistical challenges of an actual live stream.

- Timing: Set specific start time, creating the illusion of a live broadcast schedule.
- Selection: Choose a video or series of videos to be played at the specified time.
- No Pauses: Unlike on-demand streaming where users can pause and skip, this emulated live stream runs continuously, mirroring the constraints of traditional live broadcasts.

```
  active: true
  loop: false
  name: "Playlist: Webinar 'Onboarding for new employees on working with the corporate portal'"
  start_time: "2024-07-01T11:00:00Z"
```

## Request body

- Playlist
  - `name` string — Playlist name
  - `client_id` integer — Current playlist client ID
  - `active` boolean — Enables/Disables playlist. Has two possible values: - true – Playlist can be played. - false – Playlist is disabled. No broadcast while it's desabled.
  - `start_time` string — Playlist start time. Playlist won't be available before the specified time. Datetime in ISO 8601 format.
  - `loop` boolean — Enables/Disables playlist loop
  - `video_ids` integer[] — A list of VOD IDs included in the playlist. Order of videos in a playlist reflects the order of IDs in the array. Maximum video limit = 128.
  - `client_user_id` integer — Custom field where you can specify user ID in your system
  - `ad_id` integer — The advertisement ID that will be inserted into the video
  - `player_id` integer — The player ID with which the video will be played
  - `countdown` boolean — Enables countdown before playlist start with ```playlist_type: live```
  - `playlist_type` 'live' | 'vod' — Determines whether the playlist: - `live` - playlist for live-streaming - `vod` - playlist is for video on demand access
  - `hls_url` string — A URL to a master playlist HLS (master.m3u8) with MPEG TS container. This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: ```/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8``` Please see the details in ```hls_url``` attribute of /videos/{id} method. Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.
  - `hls_cmaf_url` string — A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks are in fMP4 container. It is possible to use the same suffix-options as described in the "hls_url" attribute. Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.
  - `iframe_url` string — A URL to a built-in HTML video player with the video inside. It can be inserted into an iframe on your website and the video will automatically play in all browsers. The player can be opened or shared via this direct link. Also the video player can be integrated into your web pages using the Iframe tag. Please see the details in ```iframe_url``` attribute of /videos/{id} method.

## Response `200`

Successful

- PlaylistPost
  - `name` string — Playlist name
  - `client_id` integer — Current playlist client ID
  - `active` boolean — Enables/Disables playlist. Has two possible values: - true – Playlist can be played. - false – Playlist is disabled. No broadcast while it's desabled.
  - `start_time` string — Playlist start time. Playlist won't be available before the specified time. Datetime in ISO 8601 format.
  - `loop` boolean — Enables/Disables playlist loop
  - `video_ids` integer[] — A list of VOD IDs included in the playlist. Order of videos in a playlist reflects the order of IDs in the array. Maximum video limit = 128.
  - `client_user_id` integer — Custom field where you can specify user ID in your system
  - `ad_id` integer — The advertisement ID that will be inserted into the video
  - `player_id` integer — The player ID with which the video will be played
  - `countdown` boolean — Enables countdown before playlist start with ```playlist_type: live```
  - `playlist_type` 'live' | 'vod' — Determines whether the playlist: - `live` - playlist for live-streaming - `vod` - playlist is for video on demand access
  - `hls_url` string — A URL to a master playlist HLS (master.m3u8) with MPEG TS container. This URL is a link to the main manifest. But you can also manually specify suffix-options that will allow you to change the manifest to your request: ```/playlists/{client_id}_{playlist_id}/master[-cmaf][-min-N][-max-N][-img][-(h264|hevc|av1)].m3u8``` Please see the details in ```hls_url``` attribute of /videos/{id} method. Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.
  - `hls_cmaf_url` string — A URL to a master playlist HLS (master-cmaf.m3u8) with CMAF-based chunks. Chunks are in fMP4 container. It is possible to use the same suffix-options as described in the "hls_url" attribute. Caution. Solely master.m3u8 (and master[-options].m3u8) is officially documented and intended for your use. Any additional internal manifests, sub-manifests, parameters, chunk names, file extensions, and related components are internal infrastructure entities. These may undergo modifications without prior notice, in any manner or form. It is strongly advised not to store them in your database or cache them on your end.
  - `iframe_url` string — A URL to a built-in HTML video player with the video inside. It can be inserted into an iframe on your website and the video will automatically play in all browsers. The player can be opened or shared via this direct link. Also the video player can be integrated into your web pages using the Iframe tag. Please see the details in ```iframe_url``` attribute of /videos/{id} method.

---

[API](https://skmtc.dev/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.dev/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
