Update a video
curl --request PUT \
--url https://api.pnplayer.com/v1/api/video/{videoId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"title": "<string>",
"tags": [
{
"id": 123
}
],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
]
}
'import requests
url = "https://api.pnplayer.com/v1/api/video/{videoId}"
payload = {
"title": "<string>",
"tags": [{ "id": 123 }],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
tags: [{id: 123}],
metaTags: [{key: 'author', value: 'Jane Citizen'}]
})
};
fetch('https://api.pnplayer.com/v1/api/video/{videoId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pnplayer.com/v1/api/video/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'tags' => [
[
'id' => 123
]
],
'metaTags' => [
[
'key' => 'author',
'value' => 'Jane Citizen'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pnplayer.com/v1/api/video/{videoId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.pnplayer.com/v1/api/video/{videoId}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "success"
}{
"message": "Forbidden"
}Videos
Update a video
Updates the title, replaces the set of attached tags and optionally replaces the meta tags. Omit tags to detach all tags. Omit metaTags to leave them unchanged. Tag changes fire video.tags.attached and video.tags.detached webhooks. Requires the UPDATE_MEDIA scope.
PUT
/
v1
/
api
/
video
/
{videoId}
Update a video
curl --request PUT \
--url https://api.pnplayer.com/v1/api/video/{videoId} \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: <api-key>' \
--data '
{
"title": "<string>",
"tags": [
{
"id": 123
}
],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
]
}
'import requests
url = "https://api.pnplayer.com/v1/api/video/{videoId}"
payload = {
"title": "<string>",
"tags": [{ "id": 123 }],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
]
}
headers = {
"X-Auth-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Auth-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
tags: [{id: 123}],
metaTags: [{key: 'author', value: 'Jane Citizen'}]
})
};
fetch('https://api.pnplayer.com/v1/api/video/{videoId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pnplayer.com/v1/api/video/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => '<string>',
'tags' => [
[
'id' => 123
]
],
'metaTags' => [
[
'key' => 'author',
'value' => 'Jane Citizen'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pnplayer.com/v1/api/video/{videoId}"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Auth-Token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.pnplayer.com/v1/api/video/{videoId}")
.header("X-Auth-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Auth-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"tags\": [\n {\n \"id\": 123\n }\n ],\n \"metaTags\": [\n {\n \"key\": \"author\",\n \"value\": \"Jane Citizen\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "success"
}{
"message": "Forbidden"
}Authorizations
apiKeyAuthbearerAuth
API key created in the dashboard or via POST /v1/api/api-keys. Keys are prefixed pn_ and do not expire until revoked.
Path Parameters
Video ID (GUID)
Example:
"657bb740-a71b-4529-a012-528021c31a92"
Body
application/json
Response
Updated
Example:
"success"
