curl --request PATCH \
--url https://app.trackplay.io/api/v1/uploads/{upload} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/offset+octet-stream' \
--header 'Upload-Offset: <upload-offset>' \
--data '<string>'import requests
url = "https://app.trackplay.io/api/v1/uploads/{upload}"
payload = "<string>"
headers = {
"Upload-Offset": "<upload-offset>",
"Authorization": "Bearer <token>",
"Content-Type": "application/offset+octet-stream"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Upload-Offset': '<upload-offset>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/offset+octet-stream'
},
body: '<string>'
};
fetch('https://app.trackplay.io/api/v1/uploads/{upload}', 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/uploads/{upload}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/offset+octet-stream",
"Upload-Offset: <upload-offset>"
],
]);
$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/uploads/{upload}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Upload-Offset", "<upload-offset>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/offset+octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.trackplay.io/api/v1/uploads/{upload}")
.header("Upload-Offset", "<upload-offset>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/offset+octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/uploads/{upload}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Upload-Offset"] = '<upload-offset>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/offset+octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"offset": 123,
"size": 123
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Send an upload chunk
Sends one chunk of raw bytes for a resumable upload session. Send the Upload-Offset header set to the number of bytes already sent (0 for the first chunk), and the chunk itself as the raw request body with Content-Type: application/offset+octet-stream.
This call is idempotent at the current offset: resending the offset you already sent returns the session’s current offset unchanged, without writing the chunk twice. Sending an offset ahead of what the session has recorded means a chunk was lost in transit; the call fails with a 409 so you can resend from the session’s real offset instead of leaving a gap in the assembled file.
Requires a token with the videos:write scope.
curl --request PATCH \
--url https://app.trackplay.io/api/v1/uploads/{upload} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/offset+octet-stream' \
--header 'Upload-Offset: <upload-offset>' \
--data '<string>'import requests
url = "https://app.trackplay.io/api/v1/uploads/{upload}"
payload = "<string>"
headers = {
"Upload-Offset": "<upload-offset>",
"Authorization": "Bearer <token>",
"Content-Type": "application/offset+octet-stream"
}
response = requests.patch(url, data=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'Upload-Offset': '<upload-offset>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/offset+octet-stream'
},
body: '<string>'
};
fetch('https://app.trackplay.io/api/v1/uploads/{upload}', 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/uploads/{upload}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => "<string>",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/offset+octet-stream",
"Upload-Offset: <upload-offset>"
],
]);
$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/uploads/{upload}"
payload := strings.NewReader("<string>")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Upload-Offset", "<upload-offset>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/offset+octet-stream")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://app.trackplay.io/api/v1/uploads/{upload}")
.header("Upload-Offset", "<upload-offset>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/offset+octet-stream")
.body("<string>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trackplay.io/api/v1/uploads/{upload}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Upload-Offset"] = '<upload-offset>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/offset+octet-stream'
request.body = "<string>"
response = http.request(request)
puts response.read_body{
"offset": 123,
"size": 123
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"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_….
Headers
The number of bytes already sent for this upload, before this chunk.
Path Parameters
The upload_id from POST /videos/{video}/upload/init.
Body
The body is of type file.