Skip to main content
POST
/
webhooks
/
transcoding
/
vidinfra
Transcoding Webhook
curl --request POST \
  --url https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "video_id": "38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49",
  "id": "a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04",
  "status": "processing",
  "duration": 1265,
  "size": 54321065,
  "raw_size": 98765465
}
'
import requests

url = "https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra"

payload = {
"video_id": "38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49",
"id": "a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04",
"status": "processing",
"duration": 1265,
"size": 54321065,
"raw_size": 98765465
}
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({
video_id: '38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49',
id: 'a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04',
status: 'processing',
duration: 1265,
size: 54321065,
raw_size: 98765465
})
};

fetch('https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra"

payload := strings.NewReader("{\n \"video_id\": \"38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49\",\n \"id\": \"a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04\",\n \"status\": \"processing\",\n \"duration\": 1265,\n \"size\": 54321065,\n \"raw_size\": 98765465\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))

}
require 'uri'
require 'net/http'

url = URI("https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra")

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 \"video_id\": \"38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49\",\n \"id\": \"a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04\",\n \"status\": \"processing\",\n \"duration\": 1265,\n \"size\": 54321065,\n \"raw_size\": 98765465\n}"

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.post("https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"video_id\": \"38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49\",\n \"id\": \"a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04\",\n \"status\": \"processing\",\n \"duration\": 1265,\n \"size\": 54321065,\n \"raw_size\": 98765465\n}")
.asString();
using RestSharp;


var options = new RestClientOptions("https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"video_id\": \"38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49\",\n \"id\": \"a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04\",\n \"status\": \"processing\",\n \"duration\": 1265,\n \"size\": 54321065,\n \"raw_size\": 98765465\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tenbyte.io/v1/vidinfra/webhooks/transcoding/vidinfra",
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([
'video_id' => '38dc2a4b-b2fe-46cf-ad7f-ee33a001ce49',
'id' => 'a7f590b4-3fd7-42a4-82bb-a7cfa6aa9d04',
'status' => 'processing',
'duration' => 1265,
'size' => 54321065,
'raw_size' => 98765465
]),
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;
}
{
  "message": "transcoding webhook accepted"
}
{
"message": "Invalid Request",
"success": false
}
{
"code": "auth_type_not_found",
"message": "Could not determine authentication type from request. Please provide a valid Authorization header or X-API-Key header.",
"success": false
}
{
"message": "Resource not found",
"success": false
}
{
"message": "Invalid Request",
"errors": [
{
"field": "field_name",
"code": "validation_required",
"message": "This field is required"
}
],
"success": false
}
{
"message": "Internal server error",
"success": false
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
video_id
string

Unique identifier of the video that is being transcoded.

id
string

Unique identifier of the transcoding job or process.

status
string

Current status of the transcoding process (e.g., 'queued', 'processing', 'completed', 'failed').

duration
integer

Total duration of the transcoded video in seconds.

size
integer

Size of the final transcoded video file in bytes.

raw_size
integer

Size of the original source video file in bytes before transcoding.

Response

message
string
required