Replace a video's CTA cards
curl --request POST \
--url https://app.trackplay.io/api/v1/videos/{video}/cta-cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": true
}
'import requests
url = "https://app.trackplay.io/api/v1/videos/{video}/cta-cards"
payload = {
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": True
}
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({
cards: [
{
time: 1,
duration_s: 60,
headline: '<string>',
body: JSON.stringify('<string>'),
button_text: '<string>',
url: '<string>',
button_color: '<string>',
stripe_price_id: '<string>'
}
],
enabled: true
})
};
fetch('https://app.trackplay.io/api/v1/videos/{video}/cta-cards', 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/{video}/cta-cards",
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([
'cards' => [
[
'time' => 1,
'duration_s' => 60,
'headline' => '<string>',
'body' => '<string>',
'button_text' => '<string>',
'url' => '<string>',
'button_color' => '<string>',
'stripe_price_id' => '<string>'
]
],
'enabled' => true
]),
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/{video}/cta-cards"
payload := strings.NewReader("{\n \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\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/{video}/cta-cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/videos/{video}/cta-cards")
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 \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"cta_cards_options": {
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"message": "No query results for model [App\\\\Models\\\\WorkspaceVideo] 481"
}{
"message": "The given data was invalid.",
"errors": {}
}Captions and chapters
Replace a video's CTA cards
Replaces the video’s entire CTA card list: the timed, clickable cards that appear over the player. This is a full replace, not a merge: send every card you want to keep. An empty cards array turns CTA cards off. Recompiles the player.
Requires a token with the videos:write scope.
POST
/
videos
/
{video}
/
cta-cards
Replace a video's CTA cards
curl --request POST \
--url https://app.trackplay.io/api/v1/videos/{video}/cta-cards \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": true
}
'import requests
url = "https://app.trackplay.io/api/v1/videos/{video}/cta-cards"
payload = {
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": True
}
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({
cards: [
{
time: 1,
duration_s: 60,
headline: '<string>',
body: JSON.stringify('<string>'),
button_text: '<string>',
url: '<string>',
button_color: '<string>',
stripe_price_id: '<string>'
}
],
enabled: true
})
};
fetch('https://app.trackplay.io/api/v1/videos/{video}/cta-cards', 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/{video}/cta-cards",
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([
'cards' => [
[
'time' => 1,
'duration_s' => 60,
'headline' => '<string>',
'body' => '<string>',
'button_text' => '<string>',
'url' => '<string>',
'button_color' => '<string>',
'stripe_price_id' => '<string>'
]
],
'enabled' => true
]),
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/{video}/cta-cards"
payload := strings.NewReader("{\n \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\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/{video}/cta-cards")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/videos/{video}/cta-cards")
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 \"cards\": [\n {\n \"time\": 1,\n \"duration_s\": 60,\n \"headline\": \"<string>\",\n \"body\": \"<string>\",\n \"button_text\": \"<string>\",\n \"url\": \"<string>\",\n \"button_color\": \"<string>\",\n \"stripe_price_id\": \"<string>\"\n }\n ],\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"cta_cards_options": {
"cards": [
{
"time": 1,
"duration_s": 60,
"headline": "<string>",
"body": "<string>",
"button_text": "<string>",
"url": "<string>",
"button_color": "<string>",
"stripe_price_id": "<string>"
}
],
"enabled": true
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"message": "No query results for model [App\\\\Models\\\\WorkspaceVideo] 481"
}{
"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_….
Path Parameters
The video's numeric ID.
Body
application/json
Response
The video's CTA cards.
Show child attributes
Show child attributes