Contents
On this page

Update Playlist - Plugixa Video

PATCH /pvx/v1/playlists/{id}

Change the name, description, visibility or featured flag of a playlist. Fields you leave out keep their stored value.

Needs a user (signed in with an Application Password or the login cookie) who manages the playlist: its owner, or a user who may edit other people’s videos (editors and administrators). Needs the Playlists app on in Plugixa Video -> App manager; with it off, this route answers 404.

Note. PUT and POST on the same URL also merge. featured is worked out again on every save: when the owner (not an editor) saves a playlist an editor had featured, or anyone makes it non-public, it stops being featured.

Request

PATCH https://your-site.example/wp-json/pvx/v1/playlists/1550

Path parameters

Name Type Description
id integer The playlist’s id

Request body

Content type: application/json

Field Type Required Description
title string No The name, cut to 120 characters. Must not be blank.
description string No Plain text.
visibility string No private (the default), unlisted or public.
featured boolean No Kept only for a public playlist saved by a user who may edit other people’s videos; for anyone else it becomes false.

The videos are managed with Add Video, Reorder and Remove Video.

{
  "visibility": "unlisted"
}

Responses

200 OK. data is the updated playlist with its videos.

{
  "success": true,
  "data": {
    "id": 1550,
    "title": "Road trips",
    "description": "Long drives worth watching twice.",
    "visibility": "unlisted",
    "featured": false,
    "owner_id": 25,
    "owner": "Lucas Bernard",
    "count": 2,
    "cover": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg",
    "modified": "2026-11-12T10:15:00+00:00",
    "videos": [
      {
        "id": 838,
        "title": "Iceland: The Ring Road",
        "excerpt": "A week around Iceland on Route 1, from Reykjavik to the glacier lagoons of the south coast.",
        "source": "mp4",
        "type": "video",
        "poster": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg",
        "poster_srcset": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg 1024w, https://your-site.example/wp-content/uploads/2026/11/ring-road-300x169.jpg 300w",
        "poster_width": 1024,
        "poster_height": 576,
        "duration": 1460,
        "access": "free",
        "price": 0.0,
        "channel_id": 692,
        "channel": "Far Places",
        "views": 1204,
        "likes": 37,
        "categories": [14],
        "permalink": "https://your-site.example/video/iceland-the-ring-road/",
        "date": "2026-11-12T09:30:00+00:00",
        "status": "publish",
        "coming_soon": false
      },
      {
        "id": 840,
        "title": "Faroe Islands by Ferry",
        "excerpt": "A week around Iceland on Route 1, from Reykjavik to the glacier lagoons of the south coast.",
        "source": "mp4",
        "type": "video",
        "poster": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg",
        "poster_srcset": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg 1024w, https://your-site.example/wp-content/uploads/2026/11/ring-road-300x169.jpg 300w",
        "poster_width": 1024,
        "poster_height": 576,
        "duration": 920,
        "access": "free",
        "price": 0.0,
        "channel_id": 692,
        "channel": "Far Places",
        "views": 880,
        "likes": 21,
        "categories": [14],
        "permalink": "https://your-site.example/video/faroe-islands-by-ferry/",
        "date": "2026-11-10T08:00:00+00:00",
        "status": "publish",
        "coming_soon": false
      }
    ],
    "can_manage": true
  }
}
Field Type Meaning
data.visibility string public, unlisted or private
data.featured boolean Marked by an editor for featured lists

Errors

Status Code When
401 plugixa_video_login_required Signed out.
404 plugixa_video_not_found No playlist with that id, or a private playlist of someone else.
403 plugixa_video_forbidden The caller can see the playlist but does not manage it.
422 plugixa_video_invalid title is blank, or visibility is unknown.

Plus the errors every endpoint can return.

Examples

curl -s -X PATCH "https://your-site.example/wp-json/pvx/v1/playlists/1550" \
  -u "$WP_USER:$WP_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"visibility":"unlisted"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/pvx/v1/playlists/1550');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => getenv('WP_USER') . ':' . getenv('WP_APP_PASSWORD'),
    CURLOPT_HTTPHEADER     => ['Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'visibility' => 'unlisted',
    ]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pvx/v1/playlists/1550', {
  method: 'PATCH',
  headers: {
    'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ visibility: "unlisted" }),
});
const { data } = await response.json();

Quick Links

Share