---
updatedAt: 2026-07-13T16:30:48.000Z
agentTools:
  projectIndex: https://docs.uplynk.com/llms.txt
---

# Create Virtual Linear Playlist

v4

Creates a virtual linear playlist that contains one or more asset(s). Use a playlist to provide a virtual linear playback experience for assets.

Restrict a virtual linear playlist to assets that have been encoded with the same codec (i.e., AVC or HEVC).

Use the Bulk Smartstart endpoint to create a virtual linear experience for a single asset.

### Request

Request syntax:

POST /linear-playlist

Request body parameters:

Pass the following request body parameters:

| Name                  | Data Type | Description                                                                                                                                                                                                                                                                                                                                                      |
| --------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| active                | Integer   | Determines the playlist's status. Valid values are:   *0: Inactive* 1: Active   Default value: 1                                                                                                                                                                                                                                                                 |
| ad\_slate\_fill       | Integer   | Determines whether ad breaks with insufficient ads will be filled with ad slate. Valid values are:   *0: Disables ad slate and returns back to content.* 1: Enables ad slate.   Default value: 0                                                                                                                                                                 |
| beam\_break\_duration | Integer   | Determines whether ad breaks defined within an asset are honored and their duration. Valid values are:   *0: Ad breaks are ignored.* #: Sets the duration, in seconds, for all ad breaks.   Default value: 0                                                                                                                                                     |
| desc                  | String    | Sets the virtual linear playlist's description.                                                                                                                                                                                                                                                                                                                  |
| playlist  Required    | List      | Contains an ordered list of assets and ad breaks.  A virtual linear playlist supports up to 600 assets.                                                                                                                                                                                                                                                          |
| repeat                | Integer   | Determines the number of times that the playlist will be repeated. Valid values are:   *0: The playlist will not repeat.* -1: The playlist will repeat indefinitely. \* #: The playlist will repeat the specified number of times.   Default value: 0                                                                                                            |
| skip\_drm             | Integer   | Determines whether playback of the virtual linear playlist requires a [digital signature](../Setup/Playback-URLs.htm#SigningPURLs). Valid values are:   *0: Playback requires a digital signature.* 1: Playback is allowed without a digital signature.   This property takes precedence over an asset's Require a token for playback setting.  Default value: 0 |
| studio\_drm\_required | Integer   | Determines whether playback of the virtual linear playlist will be secured via [Studio DRM](../Security/Studio-DRM.htm). Valid values are:   *0: Playback is not secured by Studio DRM.* 1: Playback is secured via DRM.   This property takes precedence over an asset's Require studio approved DRM for playback setting.  Default value: 0                    |

#### playlist List

The playlist list defines a virtual linear playlist via the following properties:

| Name           | Data Type  | Description                                                                                                                                    |
| -------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| beam  Required | Dictionary | Contains an id property.                                                                                                                       |
| id  Required   | String     | beam dictionary  Indicates the system-defined ID for the asset that will be added to the virtual linear playlist.                              |
| ad             | Dictionary | Contains a dur property.                                                                                                                       |
| dur            | Integer    | ad dictionary  Indicates the duration, in seconds, for an ad break that occurs immediately after the asset defined within the beam dictionary. |

### Response

The response for a successful request contains the following properties:

| Name                  | Data Type | Description                                                                                                                                                                                                                                                                                                                                    |
| --------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| @id                   | String    | Indicates the relative path to this endpoint.                                                                                                                                                                                                                                                                                                  |
| @type                 | String    | Returns LinearPlaylist.                                                                                                                                                                                                                                                                                                                        |
| active                | Integer   | Indicates the playlist's status. Valid values are:   *0: Inactive* 1: Active                                                                                                                                                                                                                                                                   |
| ad\_slate\_fill       | Integer   | Indicates whether ad breaks with insufficient ads will be filled with ad slate. Valid values are:   *0: Disables ad slate and returns back to content.* 1: Enables ad slate.                                                                                                                                                                   |
| beam\_break\_duration | Integer   | Indicates whether ad breaks defined within an asset are honored and their duration. Valid values are:   *0: Ad breaks are ignored.* #: Sets the duration, in seconds, for all ad breaks.                                                                                                                                                       |
| desc                  | String    | Indicates the virtual linear playlist's description.                                                                                                                                                                                                                                                                                           |
| id                    | String    | Indicates the virtual linear playlist system-defined ID.                                                                                                                                                                                                                                                                                       |
| playlist              | List      | Contains an ordered list of assets and ad breaks.  A virtual linear playlist supports up to 600 assets.                                                                                                                                                                                                                                        |
| profile               | String    | Reserved for future use.                                                                                                                                                                                                                                                                                                                       |
| repeat                | Integer   | Indicates the number of times that the playlist will be repeated. Valid values are:   *0: The playlist will not repeat.* -1: The playlist will repeat indefinitely. \* #: The playlist will repeat the specified number of times.                                                                                                              |
| skip\_drm             | Integer   | Determines whether playback of the virtual linear playlist requires a [digital signature](../Setup/Playback-URLs.htm#SigningPURLs). Valid values are:   *0: Playback requires a digital signature.* 1: Playback is allowed without a digital signature.   This property takes precedence over an asset's Require a token for playback setting. |
| studio\_drm\_required | Integer   | Determines whether playback of the virtual linear playlist will be secured via [Studio DRM](../Security/Studio-DRM.htm). Valid values are:   *0: Playback is not secured by Studio DRM.* 1: Playback is secured via DRM.   This property takes precedence over an asset's Require studio approved DRM for playback setting.                    |

#### playlist List

The playlist list defines a virtual linear playlist via the following properties:

| Name | Data Type  | Description                                                                                                                                    |
| ---- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| beam | Dictionary | Contains an id property.                                                                                                                       |
| id   | String     | beam dictionary  Indicates the system-defined ID for the asset that will be added to the virtual linear playlist.                              |
| ad   | Dictionary | Contains a dur property.                                                                                                                       |
| dur  | Integer    | ad dictionary  Indicates the duration, in seconds, for an ad break that occurs immediately after the asset defined within the beam dictionary. |

### Sample Request/Response

The code below (Python 3) shows how to create a virtual linear playlist.

This code imports names from the `api_auth` module for V4 APIs (see below).

<TutorialTile
  backgroundColor="#018FF4"
  emoji="🦉"
  id="682d18228dd6230012097fad"
  link="https://docs.uplynk.com/v2.0/recipes/api-auth-for-classic-authentication-v4-apis"
  slug="api-auth-for-classic-authentication-v4-apis"
  title="API Auth for Classic Authentication (V4 APIs)"
/>

```python
import requests
from api_auth import APICredentials, APIParams

class Create_VLP:
    def __init__(self):
        self.host = "https://services.uplynk.com"

    def run(self):
        self._create_virtual_linear_playlist()

    def _create_virtual_linear_playlist(self):
        url = "{}{}".format(self.host, "/api/v4/linear-playlist")

        description = 'Sample Playlist' # Brief description of the playlist.
        repeat = -1 # Repeats the playlist indefinitely.
        beam_break_duration = 30 # Sets 30 second ad breaks.
        playlist = [{
                'beam':{
                    'id':'abc123456defghi789jklmno012345pq'  # Asset ID
                }
            }, {
                'ad':{
                    'dur': 20 # Sets 20 second ad breaks between assets.
                }
            }, {
                'beam':{
                    'id':'1df8d13992cd4222a7343b8fafd89cd7' # Asset ID
                }
            }
        ]

        payload = {
            'desc': description,
            'repeat': repeat,
            'beam_break_duration': beam_break_duration,
            'playlist': playlist
        }

        headers = {'Content-Type': 'application/json'}

        response = requests.post(
            url, params=APIParams(APICredentials()).get_params({}), data=json.dumps(payload), headers=headers
        )

        print(response.json())

Create_VLP().run()
```

Response:

```json
{
	'@id': '/api/v4/linear-playlist/abce801613f94955b17db4f7c8e8137c',
	'@type': 'LinearPlaylist',
	'id': 'abce801613f94955b17db4f7c8e8137c',
	'desc': 'Sample Playlist',
	'repeat': -1,
	'profile': '',
	'beam_break_duration': 30,
	'ad_slate_fill': 0,
	'active': 1,
	'skip_drm': 0,
	'studio_drm_required': 0,
	'playlist': [{
			'beam': {
				'id': 'abc123456defghi789jklmno012345pq'
			}
		}, {
			'ad': {
				'dur': 20
			}
		}, {
			'beam': {
				'id': '1df8d13992cd4222a7343b8fafd89cd7'
			}
		}
	]
}
```

<br />