Send a playback lifecycle or progress update
curl --request POST \
--url https://punchplay.tv/api/platform/v1/playback/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "<string>",
"title": "<string>",
"year": 123,
"imdb_id": "<string>",
"tmdb_id": 123,
"tvdb_id": 123,
"punchplay_id": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"episode_title": "<string>",
"multi_episode": true,
"anime": true,
"progress": 123,
"duration_seconds": 123,
"position_seconds": 123,
"device_id": "<string>",
"playback_session_id": "<string>",
"event_created_at": 123,
"client_version": "<string>",
"watched": true,
"watched_threshold": 123,
"raw_filename": "<string>",
"jellyfin_user_id": "<string>"
}
'import requests
url = "https://punchplay.tv/api/platform/v1/playback/{action}"
payload = {
"event_id": "<string>",
"title": "<string>",
"year": 123,
"imdb_id": "<string>",
"tmdb_id": 123,
"tvdb_id": 123,
"punchplay_id": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"episode_title": "<string>",
"multi_episode": True,
"anime": True,
"progress": 123,
"duration_seconds": 123,
"position_seconds": 123,
"device_id": "<string>",
"playback_session_id": "<string>",
"event_created_at": 123,
"client_version": "<string>",
"watched": True,
"watched_threshold": 123,
"raw_filename": "<string>",
"jellyfin_user_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '<string>',
title: '<string>',
year: 123,
imdb_id: '<string>',
tmdb_id: 123,
tvdb_id: 123,
punchplay_id: '<string>',
season: 123,
episode: 123,
episode_end: 123,
absolute_episode: 123,
episode_title: '<string>',
multi_episode: true,
anime: true,
progress: 123,
duration_seconds: 123,
position_seconds: 123,
device_id: '<string>',
playback_session_id: '<string>',
event_created_at: 123,
client_version: '<string>',
watched: true,
watched_threshold: 123,
raw_filename: '<string>',
jellyfin_user_id: '<string>'
})
};
fetch('https://punchplay.tv/api/platform/v1/playback/{action}', 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://punchplay.tv/api/platform/v1/playback/{action}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event_id' => '<string>',
'title' => '<string>',
'year' => 123,
'imdb_id' => '<string>',
'tmdb_id' => 123,
'tvdb_id' => 123,
'punchplay_id' => '<string>',
'season' => 123,
'episode' => 123,
'episode_end' => 123,
'absolute_episode' => 123,
'episode_title' => '<string>',
'multi_episode' => true,
'anime' => true,
'progress' => 123,
'duration_seconds' => 123,
'position_seconds' => 123,
'device_id' => '<string>',
'playback_session_id' => '<string>',
'event_created_at' => 123,
'client_version' => '<string>',
'watched' => true,
'watched_threshold' => 123,
'raw_filename' => '<string>',
'jellyfin_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://punchplay.tv/api/platform/v1/playback/{action}"
payload := strings.NewReader("{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://punchplay.tv/api/platform/v1/playback/{action}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://punchplay.tv/api/platform/v1/playback/{action}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"tmdb_id": 123,
"tvdb_id": 123,
"imdb_id": "<string>",
"punchplay_id": "<string>",
"deduped": true,
"ignored": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"anime": true
}{
"ok": true,
"tmdb_id": 123,
"tvdb_id": 123,
"imdb_id": "<string>",
"punchplay_id": "<string>",
"deduped": true,
"ignored": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"anime": true
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}Playback
Send a playback lifecycle or progress update
A watched stop additionally requires history:write because it creates watch history.
POST
/
api
/
platform
/
v1
/
playback
/
{action}
Send a playback lifecycle or progress update
curl --request POST \
--url https://punchplay.tv/api/platform/v1/playback/{action} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"event_id": "<string>",
"title": "<string>",
"year": 123,
"imdb_id": "<string>",
"tmdb_id": 123,
"tvdb_id": 123,
"punchplay_id": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"episode_title": "<string>",
"multi_episode": true,
"anime": true,
"progress": 123,
"duration_seconds": 123,
"position_seconds": 123,
"device_id": "<string>",
"playback_session_id": "<string>",
"event_created_at": 123,
"client_version": "<string>",
"watched": true,
"watched_threshold": 123,
"raw_filename": "<string>",
"jellyfin_user_id": "<string>"
}
'import requests
url = "https://punchplay.tv/api/platform/v1/playback/{action}"
payload = {
"event_id": "<string>",
"title": "<string>",
"year": 123,
"imdb_id": "<string>",
"tmdb_id": 123,
"tvdb_id": 123,
"punchplay_id": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"episode_title": "<string>",
"multi_episode": True,
"anime": True,
"progress": 123,
"duration_seconds": 123,
"position_seconds": 123,
"device_id": "<string>",
"playback_session_id": "<string>",
"event_created_at": 123,
"client_version": "<string>",
"watched": True,
"watched_threshold": 123,
"raw_filename": "<string>",
"jellyfin_user_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
event_id: '<string>',
title: '<string>',
year: 123,
imdb_id: '<string>',
tmdb_id: 123,
tvdb_id: 123,
punchplay_id: '<string>',
season: 123,
episode: 123,
episode_end: 123,
absolute_episode: 123,
episode_title: '<string>',
multi_episode: true,
anime: true,
progress: 123,
duration_seconds: 123,
position_seconds: 123,
device_id: '<string>',
playback_session_id: '<string>',
event_created_at: 123,
client_version: '<string>',
watched: true,
watched_threshold: 123,
raw_filename: '<string>',
jellyfin_user_id: '<string>'
})
};
fetch('https://punchplay.tv/api/platform/v1/playback/{action}', 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://punchplay.tv/api/platform/v1/playback/{action}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'event_id' => '<string>',
'title' => '<string>',
'year' => 123,
'imdb_id' => '<string>',
'tmdb_id' => 123,
'tvdb_id' => 123,
'punchplay_id' => '<string>',
'season' => 123,
'episode' => 123,
'episode_end' => 123,
'absolute_episode' => 123,
'episode_title' => '<string>',
'multi_episode' => true,
'anime' => true,
'progress' => 123,
'duration_seconds' => 123,
'position_seconds' => 123,
'device_id' => '<string>',
'playback_session_id' => '<string>',
'event_created_at' => 123,
'client_version' => '<string>',
'watched' => true,
'watched_threshold' => 123,
'raw_filename' => '<string>',
'jellyfin_user_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://punchplay.tv/api/platform/v1/playback/{action}"
payload := strings.NewReader("{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://punchplay.tv/api/platform/v1/playback/{action}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://punchplay.tv/api/platform/v1/playback/{action}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"event_id\": \"<string>\",\n \"title\": \"<string>\",\n \"year\": 123,\n \"imdb_id\": \"<string>\",\n \"tmdb_id\": 123,\n \"tvdb_id\": 123,\n \"punchplay_id\": \"<string>\",\n \"season\": 123,\n \"episode\": 123,\n \"episode_end\": 123,\n \"absolute_episode\": 123,\n \"episode_title\": \"<string>\",\n \"multi_episode\": true,\n \"anime\": true,\n \"progress\": 123,\n \"duration_seconds\": 123,\n \"position_seconds\": 123,\n \"device_id\": \"<string>\",\n \"playback_session_id\": \"<string>\",\n \"event_created_at\": 123,\n \"client_version\": \"<string>\",\n \"watched\": true,\n \"watched_threshold\": 123,\n \"raw_filename\": \"<string>\",\n \"jellyfin_user_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"ok": true,
"tmdb_id": 123,
"tvdb_id": 123,
"imdb_id": "<string>",
"punchplay_id": "<string>",
"deduped": true,
"ignored": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"anime": true
}{
"ok": true,
"tmdb_id": 123,
"tvdb_id": 123,
"imdb_id": "<string>",
"punchplay_id": "<string>",
"deduped": true,
"ignored": "<string>",
"season": 123,
"episode": 123,
"episode_end": 123,
"absolute_episode": 123,
"anime": true
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}{
"error": "<string>",
"message": "<string>",
"request_id": "<string>",
"required_scope": "<string>"
}Authorizations
The access token received from the authorization server in the OAuth 2.0 flow.
Path Parameters
Available options:
start, pause, resume, stop, progress Body
application/json
Available options:
movie, episode Response
Processed playback action
Available options:
movie, episode ⌘I