POST
/
playlists
using LukeHagar.PlexAPI.SDK;
using LukeHagar.PlexAPI.SDK.Models.Components;
using LukeHagar.PlexAPI.SDK.Models.Requests;

var sdk = new PlexAPI(accessToken: "<YOUR_API_KEY_HERE>");

CreatePlaylistRequest req = new CreatePlaylistRequest() {
    Title = "<value>",
    Type = CreatePlaylistQueryParamType.Photo,
    Smart = Smart.One,
    Uri = "https://hoarse-testing.info/",
};

var res = await sdk.Playlists.CreatePlaylistAsync(req);

// handle response
{
  "MediaContainer": {
    "size": 7,
    "Metadata": [
      {
        "ratingKey": "96",
        "key": "/playlists/96/items",
        "guid": "com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55",
        "type": "playlist",
        "title": "A Great Playlist",
        "summary": "What a great playlist",
        "smart": false,
        "playlistType": "video",
        "icon": "playlist://image.smart",
        "viewCount": 1,
        "lastViewedAt": 1705719589,
        "leafCount": 1,
        "addedAt": 1705719589,
        "updatedAt": 1705724593,
        "composite": "/playlists/96/composite/1705724593",
        "duration": 141000
      }
    ]
  }
}

Authorizations

X-Plex-Token
string
header
required

Plex Authentication Token

Query Parameters

title
string
required

name of the playlist

type
enum<string>
required

type of playlist to create

Available options:
audio,
video,
photo
smart
enum<integer>
required

whether the playlist is smart or not

Available options:
0,
1
uri
string
required

the content URI for the playlist

playQueueID
number

the play queue to copy to a playlist

Response

200
application/json
returns all playlists
MediaContainer
object