Plex Play Queue API

The playqueue feature within a media provider A play queue represents the current list of media for playback. Although queues are persisted by the server, they should be regarded by the user as a fairly lightweight, an ephemeral list of items queued up for playback in a session. There is generally one active queue for each type of media (music, video, photos) that can be added to or destroyed and replaced with a fresh queue. Play Queues has a region, which we refer to in this doc (partially for historical reasons) as "Up Next". This region is defined by `playQueueLastAddedItemID` existing on the media container. This follows iTunes' terminology. It is a special region after the currently playing item but before the originally-played items. This enables "Party Mode" listening/viewing, where items can be added on-the-fly, and normal queue playback resumed when completed. You can visualize the play queue as a sliding window in the complete list of media queued for playback. This model is important when scaling to larger play queues (e.g. shuffling 40,000 audio tracks). The client only needs visibility into small areas of the queue at any given time, and the server can optimize access in this fashion. All created play queues will have an empty "Up Next" area - unless the item is an album and no `key` is provided. In this case the "Up Next" area will be populated by the contents of the album. This is to allow queueing of multiple albums - since the 'Add to Up Next' will insert after all the tracks. This means that If you're creating a PQ from an album, you can only shuffle it if you set `key`. This is due to the above implicit queueing of albums when no `key` is provided as well as the current limitation that you cannot shuffle a PQ with an "Up Next" area. The play queue window advances as the server receives timeline requests. The client needs to retrieve the play queue as the “now playing” item changes. There is no play queue API to update the playing item.

GitHub OpenAPI

Operations 9

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 /playQueues Create a play queue · Create a play queue #
Ask an LLM
“How do I queue up a playlist for a device?”
“Can I shuffle a new play queue when I create it?”
Tell an agent
Create a {type} play queue from {uri}.
Queue playlist {playlistID} as a {type} play queue with shuffle {shuffle}.
GET /playQueues/{playQueueId} Get a play queue · Retrieve a play queue #
Ask an LLM
“What's in a device's play queue right now?”
“Can I see the items before and after the current one in a play queue?”
Tell an agent
Get play queue {playQueueId}.
Show the {window} items around {center} in play queue {playQueueId}.
PUT /playQueues/{playQueueId} Add a generator or playlist to a queue · Add a generator or playlist to a play queue #
Ask an LLM
“How do I add a party mode generator to a play queue?”
“Can I queue a playlist at the next position instead of the end?”
Tell an agent
Add {uri} to play queue {playQueueId}.
Queue playlist {playlistID} as the next item in {playQueueId}.
DELETE /playQueues/{playQueueId}/items Clear a play queue · Clear a play queue #
Ask an LLM
“How do I clear every item out of a play queue?”
“Can I empty a device's queue and start fresh?”
Tell an agent destructive · confirm first
Clear play queue {playQueueId}.
Empty the queue {playQueueId} completely.
DELETE /playQueues/{playQueueId}/items/{playQueueItemId} Remove one item from a queue · Delete an item from a play queue #
Ask an LLM
“How do I take a single movie out of a device's play queue?”
“Can I remove one item by its play queue item ID?”
Tell an agent destructive · confirm first
Remove item {playQueueItemId} from play queue {playQueueId}.
Delete {playQueueItemId} from {playQueueId}.
PUT /playQueues/{playQueueId}/items/{playQueueItemId}/move Move an item in a play queue · Move an item in a play queue #
Ask an LLM
“How do I move an item to the top of a play queue?”
“Can I insert an item after another one in the queue?”
Tell an agent
Move item {playQueueItemId} to the top of play queue {playQueueId}.
Insert {playQueueItemId} after {after} in {playQueueId}.
PUT /playQueues/{playQueueId}/reset Reset a play queue · Reset a play queue #
Ask an LLM
“How do I make the current item the first in a play queue?”
“Can I reset a device's queue back to the start?”
Tell an agent
Reset play queue {playQueueId} so the current item is first.
Start play queue {playQueueId} over from the current item.
PUT /playQueues/{playQueueId}/shuffle Shuffle a play queue · Shuffle a play queue #
Ask an LLM
“How do I shuffle the items in a play queue?”
“Does shuffling work on queues that have an Up Next area?”
Tell an agent
Shuffle play queue {playQueueId}.
Randomize the order of items in {playQueueId}.
PUT /playQueues/{playQueueId}/unshuffle Unshuffle a play queue · Unshuffle a play queue #
Ask an LLM
“How do I restore a shuffled queue to its original order?”
“Can I undo shuffling on a play queue?”
Tell an agent
Unshuffle play queue {playQueueId}.
Restore the natural order of {playQueueId}.

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-play-queue-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-play-queue-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plex Media Server Play Queue 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 (45 KB total) ---
# Full source: https://artifacts.apis.io/plex/openapi/plex-play-queue-api-openapi.yml