Contents
On this page
Update Video - Plugixa Video
PATCH /pvx/v1/videos/{id}
Change some fields of a video. Fields you leave out keep their stored value.
Needs a user (signed in with an Application Password or the login cookie) who has the plugixa_video_edit capability and the right to edit this video: administrators and editors any video, a Video Creator PRO only their own. In the free plugin only administrators hold it; with Pro, editors and the Video Creator role hold it too.
Note.
PUTandPOSTon the same URL do the same thing: every method merges your fields into the stored video, none of them replaces it. To clear a list such astags, send it empty.
Note. When the body contains
channel_id, the caller must be able to edit that channel, even when it is the channel the video is already in. A Video Creator whose video an editor placed in another channel gets403if they send thatchannel_idback: leave it out.
Request
PATCH https://your-site.example/wp-json/pvx/v1/videos/838
Path parameters
| Name | Type | Description |
|---|---|---|
id |
integer |
The video’s id |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
title |
string |
No | Must not be blank. |
description |
string |
No | HTML, filtered like post content. Lines such as 04:10 The Golden Circle become chapters when there are at least two. |
status |
string |
No | Defaults to draft. publish, pvx_unlisted (only people with the link can open it), pending, draft or private. future cannot be sent: it follows from a release_date ahead. |
release_date |
string |
No | Publication date in the site’s time zone, YYYY-MM-DDTHH:MM. A date ahead with status publish schedules the video. |
source |
string |
No | hls, mp4 (the default), youtube or vimeo. |
url |
string |
No | The video file, stream or page, http or https. Required to publish: a publish or pvx_unlisted video without one is refused. |
type |
string |
No | video (the default); with Pro also movie or episode. |
poster_id |
integer |
No | Media library id of the poster. Also set as the featured image. |
duration |
integer |
No | Length in seconds. |
access |
string |
No | free (the default) or members; with Pro also paid. |
price |
number |
No | Kept only when access is paid, rounded to 2 decimals; otherwise stored as 0. |
channel_id |
integer |
No | A channel the caller may edit. |
categories |
integer[] |
No | Category ids. Ids that are not categories are dropped. |
tags |
integer[] |
No | Tag ids. Ids that are not tags are dropped. |
comments |
boolean |
No | Open or close comments. Left out on create, the site’s discussion setting applies. |
series_id |
integer |
No | The series of an episode PRO, one the caller may edit. |
season |
integer |
No | Season of an episode, from 1 (the default) PRO. |
episode |
integer |
No | Episode number in its season, from 1 (the default) PRO. |
year |
integer |
No | Release year, up to 9999 PRO. |
age_rating |
string |
No | Free text, cut to 20 characters PRO. |
cast |
string |
No | Free text over several lines PRO. |
trailer |
string |
No | Trailer URL PRO. |
related |
integer[] |
No | Hand-picked related videos, up to 24 ids PRO. |
captions |
object[] |
No | Subtitle tracks, each {lang, label, url, default}; tracks without a URL are dropped and only the first default counts PRO. |
password |
string |
No | Up to 100 characters. A video with a password is published as unlisted PRO. |
The same fields as Create Video, all optional. A scheduled video is saved as publish, and its release_date decides whether it stays scheduled. Asking for pending on a video that is already live keeps it live: review only gates the first publication. An access mode that is no longer offered (paid after Pro was removed) may be kept but not chosen.
{
"title": "Iceland: The Ring Road, Extended",
"access": "members"
}
Responses
200 OK. data is the updated video in the back-office shape.
{
"success": true,
"data": {
"id": 838,
"title": "Iceland: The Ring Road, Extended",
"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": "members",
"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,
"description": "<p>A week around Iceland on Route 1.</p>\n<p>00:00 Reykjavik<br>04:10 The Golden Circle<br>12:30 Jokulsarlon</p>",
"url": "https://cdn.your-site.example/videos/ring-road.mp4",
"poster_id": 1201,
"tags": [31, 32],
"comments": true,
"release_date": "2026-11-12T10:30",
"author": 1,
"modified": "2026-11-12T10:15:00+00:00"
}
}
| Field | Type | Meaning |
|---|---|---|
data.access |
string |
The new access mode |
data.status |
string |
The status after the change, which review or a password can override |
data.modified |
string |
UTC datetime of this change |
Errors
| Status | Code | When |
|---|---|---|
404 |
plugixa_video_not_found |
No video with that id. |
422 |
plugixa_video_invalid |
A field is wrong; data.field names it. See Create Video. |
401 / 403 |
plugixa_video_forbidden |
The caller may not edit this video, or the channel in channel_id. |
Plus the errors every endpoint can return.
Examples
curl -s -X PATCH "https://your-site.example/wp-json/pvx/v1/videos/838" \
-u "$WP_USER:$WP_APP_PASSWORD" \
-H "Content-Type: application/json" \
-d '{"title":"Iceland: The Ring Road, Extended","access":"members"}'
<?php
$ch = curl_init('https://your-site.example/wp-json/pvx/v1/videos/838');
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([
'title' => 'Iceland: The Ring Road, Extended',
'access' => 'members',
]),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const response = await fetch('https://your-site.example/wp-json/pvx/v1/videos/838', {
method: 'PATCH',
headers: {
'Authorization': `Basic ${btoa(`${process.env.WP_USER}:${process.env.WP_APP_PASSWORD}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ title: "Iceland: The Ring Road, Extended", access: "members" }),
});
const { data } = await response.json();
Quick Links
Share