Videos
Delete a video
DELETE
/
v1
/
videos
/
{id}
Delete a video
curl --request DELETE \
--url https://api.vturb.com/v1/videos/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vturb.com/v1/videos/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vturb.com/v1/videos/{id}', 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://api.vturb.com/v1/videos/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://api.vturb.com/v1/videos/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.vturb.com/v1/videos/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/video_in_ab_test",
"code": "video_in_ab_test",
"message": "The video is a variant of an A/B test and cannot be deleted. Remove it from the test first.",
"request_id": "00000000-0000-0000-0000-000000000000",
"ab_test_ids": [
"66b0c1d2e3f4a5b6c7d8e9f1"
]
}{
"type": "https://docs.vturb.com/errors/unprocessable_content",
"code": "unprocessable_content",
"message": "The request is invalid. See errors for the fields that failed.",
"request_id": "00000000-0000-0000-0000-000000000000",
"errors": [
{
"field": "base",
"message": "The video could not be deleted."
}
]
}{
"type": "https://docs.vturb.com/errors/service_unavailable",
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry shortly.",
"request_id": "00000000-0000-0000-0000-000000000000"
}Authorizations
Paste your VTurb API token (vt_...). Sent as Authorization: Bearer <token>.
Path Parameters
Response
The video is deleted and its embed stops playing. Deleted videos stay in the recycle bin for 30 days and can be restored from the dashboard.
Was this page helpful?
⌘I
Delete a video
curl --request DELETE \
--url https://api.vturb.com/v1/videos/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vturb.com/v1/videos/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vturb.com/v1/videos/{id}', 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://api.vturb.com/v1/videos/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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://api.vturb.com/v1/videos/{id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.vturb.com/v1/videos/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/videos/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "https://docs.vturb.com/errors/unauthorized",
"code": "unauthorized",
"message": "Missing or invalid API credential. Send a vt_ token in the Authorization header.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/forbidden",
"code": "forbidden",
"message": "The credential is missing the scope this action requires.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/not_found",
"code": "not_found",
"message": "Resource not found.",
"request_id": "00000000-0000-0000-0000-000000000000"
}{
"type": "https://docs.vturb.com/errors/video_in_ab_test",
"code": "video_in_ab_test",
"message": "The video is a variant of an A/B test and cannot be deleted. Remove it from the test first.",
"request_id": "00000000-0000-0000-0000-000000000000",
"ab_test_ids": [
"66b0c1d2e3f4a5b6c7d8e9f1"
]
}{
"type": "https://docs.vturb.com/errors/unprocessable_content",
"code": "unprocessable_content",
"message": "The request is invalid. See errors for the fields that failed.",
"request_id": "00000000-0000-0000-0000-000000000000",
"errors": [
{
"field": "base",
"message": "The video could not be deleted."
}
]
}{
"type": "https://docs.vturb.com/errors/service_unavailable",
"code": "service_unavailable",
"message": "The service is temporarily unavailable. Retry shortly.",
"request_id": "00000000-0000-0000-0000-000000000000"
}