Plex Library Playlists API

Endpoints for manipulating playlists.

GitHub OpenAPI
Business capability
Self-Hosted Media Servers & Library Automation AE-170.90

Operations 13

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /playlists Create a playlist · Create a Playlist #
Ask an LLM
“How do I create a new playlist in Plex?”
“Can I create a blank playlist to fill later?”
Tell an agent
Create a new playlist.
Create a playlist from the media at {uri}.
DELETE /playlists/{playlistId} Delete a playlist · Delete a Playlist #
Ask an LLM
“How do I delete a playlist?”
“Can I remove a playlist by its ID?”
Tell an agent destructive · confirm first
Delete playlist {playlistId}.
Remove the playlist {playlistId}.
PUT /playlists/{playlistId} Edit a playlist's metadata · Editing a Playlist #
Ask an LLM
“Can I edit the name and description of an existing playlist?”
“How do I change a playlist's metadata?”
Tell an agent
Edit playlist {playlistId}.
Update the metadata of playlist {playlistId}.
DELETE /playlists/{playlistId}/items Clear a dumb playlist · Clearing a playlist #
Ask an LLM
“How do I clear all items from a dumb playlist?”
“Can I empty a playlist that isn't smart?”
Tell an agent destructive · confirm first
Clear playlist {playlistId}.
Empty the dumb playlist {playlistId}.
PUT /playlists/{playlistId}/items Add items to a playlist · Adding to a Playlist #
Ask an LLM
“How do I add media to a playlist?”
“Can I add a play queue to a playlist?”
Tell an agent
Add the media at {uri} to playlist {playlistId}.
Add play queue {playQueueID} to playlist {playlistId}.
GET /playlists/{playlistId}/items/{generatorId} Get a smart playlist generator · Get a playlist generator #
Ask an LLM
“What does a particular generator in my smart playlist look like?”
“Can I fetch one smart playlist generator by its ID?”
Tell an agent
Get generator {generatorId} of playlist {playlistId}.
Show the smart rules {generatorId} in playlist {playlistId}.
DELETE /playlists/{playlistId}/items/{generatorId} Remove a smart playlist generator · Delete a Generator #
Ask an LLM
“How do I remove a generator from a smart playlist?”
“Can I delete a smart playlist generator?”
Tell an agent destructive · confirm first
Delete generator {generatorId} from playlist {playlistId}.
Remove the smart rules {generatorId} in playlist {playlistId}.
PUT /playlists/{playlistId}/items/{generatorId} Modify a smart playlist generator · Modify a Generator #
Ask an LLM
“How do I change the rules of a smart playlist generator?”
“Can I edit a smart playlist generator?”
Tell an agent
Modify generator {generatorId} in playlist {playlistId}.
Change the smart rules {generatorId} of playlist {playlistId}.
GET /playlists/{playlistId}/items/{generatorId}/items List items of a smart playlist generator · Get a playlist generator's items #
Ask an LLM
“What media does a smart playlist generator currently include?”
“Can I list the items a smart generator has found?”
Tell an agent
List the items of generator {generatorId} in playlist {playlistId}.
Show what smart rules {generatorId} in playlist {playlistId} has found.
PUT /playlists/{playlistId}/items/{generatorId}/{metadataId}/{action} Refresh a smart playlist generator · Reprocess a generator #
Ask an LLM
“How do I make a smart playlist recompute its items?”
“Can I force a smart generator to refresh?”
Tell an agent
Reprocess generator {generatorId} of playlist {playlistId} for item {metadataId} with action {action}.
Refresh smart rules {generatorId} in playlist {playlistId} for {metadataId} using {action}.
PUT /playlists/{playlistId}/items/{playlistItemId}/move Reorder items in a dumb playlist · Moving items in a playlist #
Ask an LLM
“How do I move an item to the top of a dumb playlist?”
“Can I reorder items in a dumb playlist?”
Tell an agent
Move item {playlistItemId} in playlist {playlistId} to the top.
Move item {playlistItemId} in playlist {playlistId} after item {after}.
GET /playlists/{playlistId}/generators List a playlist's generators · Get a playlist's generators #
Ask an LLM
“Which generators make up my smart playlist?”
“Can I see all the smart rules in a playlist?”
Tell an agent
List the generators in playlist {playlistId}.
Show every smart rule in playlist {playlistId}.
POST /playlists/upload Import m3u playlists from the server · Upload #
Ask an LLM
“How do I import m3u playlists stored on the server?”
“Can I force overwriting a duplicate playlist when importing?”
Tell an agent
Import m3u playlists from server path {path}.
Upload m3u playlists from {path} with force {force}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/plex:plex-library-playlists-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

plex-library-playlists-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plex Media Server Library Playlists API
  version: '1.2.2

    '
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: '# API Info

    ## Content Types

    The API supports responses in both XML and JSON, and clients can request one or the other using the standard `Accept` HTTP header.'
servers:
- url: https://{IP-description}.{identifier}.plex.direct:{port}
  variables:
    IP-description:
      default: 1-2-3-4
      description: A `-` separated string of the IPv4 or IPv6 address components
    identifier:
      default: 0123456789abcdef0123456789abcdef
      description: The unique identifier of this particular PMS
    port:
      default: '32400'
security:
- user_token:
  - shared user
  - admin
tags:


# --- truncated at 32 KB (58 KB total) ---
# Full source: https://artifacts.apis.io/plex/openapi/plex-library-playlists-api-openapi.yml