curl --request POST \
--url https://app.trackplay.io/api/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "New VSL",
"player_version": "v2"
}
'import requests
url = "https://app.trackplay.io/api/v1/videos"
payload = {
"title": "New VSL",
"player_version": "v2"
}
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({title: 'New VSL', player_version: 'v2'})
};
fetch('https://app.trackplay.io/api/v1/videos', 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://app.trackplay.io/api/v1/videos",
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([
'title' => 'New VSL',
'player_version' => 'v2'
]),
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://app.trackplay.io/api/v1/videos"
payload := strings.NewReader("{\n \"title\": \"New VSL\",\n \"player_version\": \"v2\"\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://app.trackplay.io/api/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"New VSL\",\n \"player_version\": \"v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/videos")
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 \"title\": \"New VSL\",\n \"player_version\": \"v2\"\n}"
response = http.request(request)
puts response.read_body{
"video": {
"id": 123,
"code": "<string>",
"title": "<string>",
"workspace_id": 123,
"folder_id": 123,
"tags": [
"<string>"
],
"player_version": "v2",
"landscape_hls": "<string>",
"portrait_hls": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"message": "The given data was invalid.",
"errors": {}
}Create a video
Creates a new, empty video shell. The video has no playable media until you upload one with the resumable upload protocol or the single-shot upload endpoint.
Pass copy_from to clone every option-group setting (style, playback, autoplay, captions, chapters, CTA cards, and the rest) from an existing video in this workspace. Source media is never copied: the new video still needs its own upload.
Fires the video.created webhook.
Requires a token with the videos:write scope.
curl --request POST \
--url https://app.trackplay.io/api/v1/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "New VSL",
"player_version": "v2"
}
'import requests
url = "https://app.trackplay.io/api/v1/videos"
payload = {
"title": "New VSL",
"player_version": "v2"
}
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({title: 'New VSL', player_version: 'v2'})
};
fetch('https://app.trackplay.io/api/v1/videos', 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://app.trackplay.io/api/v1/videos",
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([
'title' => 'New VSL',
'player_version' => 'v2'
]),
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://app.trackplay.io/api/v1/videos"
payload := strings.NewReader("{\n \"title\": \"New VSL\",\n \"player_version\": \"v2\"\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://app.trackplay.io/api/v1/videos")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"New VSL\",\n \"player_version\": \"v2\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/videos")
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 \"title\": \"New VSL\",\n \"player_version\": \"v2\"\n}"
response = http.request(request)
puts response.read_body{
"video": {
"id": 123,
"code": "<string>",
"title": "<string>",
"workspace_id": 123,
"folder_id": 123,
"tags": [
"<string>"
],
"player_version": "v2",
"landscape_hls": "<string>",
"portrait_hls": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"message": "The given data was invalid.",
"errors": {}
}Authorizations
A scoped token minted in Settings → API tokens. Send it as Authorization: Bearer tplt_… or X-API-Key: tplt_….
Headers
Retry-safe key. The first response for a given key is cached for 24 hours and replayed on a repeat, with Idempotency-Replayed: true set.
Body
The video's title. Required.
255Places the video in an existing folder of this workspace. Anything else is refused with 422 FOLDER_NOT_FOUND.
Free-form tags for organizing videos in the dashboard.
64Which player build the video uses. Defaults to the workspace's default new-video version.
v1, v2, 1, 2 Copy every option-group column and the player version from another video in this workspace. The new video still needs its own upload: source media is never copied.
true makes the video a silent looping clip with no overlays, prompts or controls. See the Plain mode guide.
Response
The video was created.
A video and its settings. A video carries around thirty option-group columns (style, playback, autoplay, captions, chapters, CTA cards, playlist, and more) that are not itemized here. Read GET /videos/{video}/settings for the full set, or the dedicated endpoint for the group you care about (captions, chapters, AI segments, CTA cards).
Show child attributes
Show child attributes