Playlists
Create a Playlist
Server
Media
Butler
Plex
Library
- GETGet Hash Value
- GETGet Recently Added
- GETGet All Libraries
- GETGet library details
- DELDelete library section
- GETGet library items
- GETGet all media of library
- GETRefresh Metadata Of The Library
- GETSearch library
- GETGet Genres of library media
- GETGet Countries of library media
- GETGet Actors of library media
- GETSearch All Libraries
- GETGet Media Metadata
- GETGet Items Children
- GETGet Top Watched Content
- GETGet On Deck
Watchlist
Playlists
Authentication
Sessions
Playlists
Create a Playlist
Create a new playlist. By default the playlist is blank. To create a playlist along with a first item, pass:
uri
- The content URI for what we’re playing (e.g.server://1234/com.plexapp.plugins.library/library/metadata/1
).playQueueID
- To create a playlist from an existing play queue.
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
Plex Authentication Token
Query Parameters
name of the playlist
type of playlist to create
Available options:
audio
, video
, photo
whether the playlist is smart or not
Available options:
0
, 1
the content URI for the playlist
the play queue to copy to a playlist
Response
200
application/json
returns all playlists
Example:
7
Example:
"96"
Example:
"/playlists/96/items"
Example:
"com.plexapp.agents.none://a2f92937-1408-40e2-b022-63a8a9377e55"
Example:
"playlist"
Example:
"A Great Playlist"
Example:
"What a great playlist"
Example:
false
Example:
"video"
Example:
"playlist://image.smart"
Example:
1
Example:
1705719589
Example:
1
Example:
1705719589
Example:
1705724593
Example:
"/playlists/96/composite/1705724593"
Example:
141000
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
}
]
}
}