Contents
On this page

Create Playlist - Plugixa Video

POST /pvx/v1/playlists

Create a playlist owned by the caller, optionally with its first video.

Any signed-in user (signed in with an Application Password or the login cookie). Signed out, it answers 401. Needs the Playlists app on in Plugixa Video -> App manager; with it off, this route answers 404.

Note. A user can own at most 100 playlists. A video_id that cannot be added (a draft, or no such video) is skipped without an error: the playlist is still created, empty.

Request

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

Request body

Content type: application/json

Field Type Required Description
title string Yes 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.
video_id integer No A first video to add. Only a published or scheduled video, or one the caller may edit.
{
  "title": "Road trips",
  "description": "Long drives worth watching twice.",
  "visibility": "public",
  "video_id": 838
}

Responses

201 Created. data is the new playlist with its videos.

{
  "success": true,
  "data": {
    "id": 1550,
    "title": "Road trips",
    "description": "Long drives worth watching twice.",
    "visibility": "public",
    "featured": false,
    "owner_id": 25,
    "owner": "Lucas Bernard",
    "count": 1,
    "cover": "https://your-site.example/wp-content/uploads/2026/11/ring-road-1024x576.jpg",
    "modified": "2026-11-12T09:30: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
      }
    ],
    "can_manage": true
  }
}
Field Type Meaning
data.id integer The playlist’s id
data.visibility string public, unlisted or private
data.videos object[] The videos, in the public shape of List Videos
data.can_manage boolean true for the owner

Errors

Status Code When
401 plugixa_video_login_required Signed out.
422 plugixa_video_invalid title is blank, or visibility is unknown; data.field names the field.
422 plugixa_video_limit The caller already owns 100 playlists.

Plus the errors every endpoint can return.

Examples

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

Quick Links

Share