List webhook subscriptions
curl --request GET \
--url https://app.trackplay.io/api/v1/webhooks \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trackplay.io/api/v1/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trackplay.io/api/v1/webhooks', 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/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trackplay.io/api/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trackplay.io/api/v1/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": 123,
"workspace_id": 123,
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"is_active": true,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"failure_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"supported_events": [
"video.created",
"video.uploaded",
"video.settings.deployed",
"video.deleted",
"video.viewed",
"conversion",
"conversion.created",
"play",
"play.milestone",
"cta.clicked",
"ended",
"lead.captured",
"lesson.completed",
"playlist.ended",
"lead_form.submitted",
"quiz.answered",
"split_test.winner_declared"
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Webhooks
List webhook subscriptions
Lists every webhook subscription in this workspace, along with the full list of event names you can subscribe to. secret is never included: see the note on the webhook object.
Requires a token with the webhooks:write scope. There is no read-only webhooks scope: listing subscriptions requires the same scope that manages them.
GET
/
webhooks
List webhook subscriptions
curl --request GET \
--url https://app.trackplay.io/api/v1/webhooks \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.trackplay.io/api/v1/webhooks"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.trackplay.io/api/v1/webhooks', 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/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.trackplay.io/api/v1/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.trackplay.io/api/v1/webhooks")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"webhooks": [
{
"id": 123,
"workspace_id": 123,
"name": "<string>",
"url": "<string>",
"events": [
"<string>"
],
"is_active": true,
"last_success_at": "2023-11-07T05:31:56Z",
"last_failure_at": "2023-11-07T05:31:56Z",
"failure_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"supported_events": [
"video.created",
"video.uploaded",
"video.settings.deployed",
"video.deleted",
"video.viewed",
"conversion",
"conversion.created",
"play",
"play.milestone",
"cta.clicked",
"ended",
"lead.captured",
"lesson.completed",
"playlist.ended",
"lead_form.submitted",
"quiz.answered",
"split_test.winner_declared"
]
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
A scoped token minted in Settings → API tokens. Send it as Authorization: Bearer tplt_… or X-API-Key: tplt_….
Response
The subscriptions and the supported event catalogue.
Show child attributes
Show child attributes
Every event name you can subscribe to.
Example:
[ "video.created", "video.uploaded", "video.settings.deployed", "video.deleted", "video.viewed", "conversion", "conversion.created", "play", "play.milestone", "cta.clicked", "ended", "lead.captured", "lesson.completed", "playlist.ended", "lead_form.submitted", "quiz.answered", "split_test.winner_declared" ]