Add asset to playlist

This operation adds a single asset or a list of assets to a playlist.

Path Parameters
  • playlist_id
    Type: string
    required

    Playlist ID in which the asset needs to be added.

Body
application/json
  • asset_list
    Type: array object[]
    required
Responses
  • application/json
  • application/json
Request Example for post/video/playlist/{playlist_id}/asset
import Gumlet from '@gumlet/nodejs-sdk';

const client = new Gumlet({
  apiKey: process.env['API_KEY'], // defaults to the API_KEY env var
});

const videoPlaylist = await client.videoPlaylists.createAsset('playlistId', {
  asset_list: [
    { asset_id: '6508790283e4d60611846790' },
    { position: 1, asset_id: '650878f883e4d6061184677d' },
    { asset_id: '650878de83e4d6061184676a' },
    { position: 2, asset_id: '650878d883e4d60611846757' },
    { position: 3, asset_id: '65578dd87eebc22dcdd549a2' },
  ],
});

console.log(videoPlaylist);
{
  "success": true
}