Folders
Create a folder
POST
/
v1
/
folders
Create a folder
curl --request POST \
--url https://api.vturb.com/v1/folders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Testes",
"kind": "ab_tests",
"folder_id": null
}
'import requests
url = "https://api.vturb.com/v1/folders"
payload = {
"name": "Testes",
"kind": "ab_tests",
"folder_id": None
}
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({name: 'Testes', kind: 'ab_tests', folder_id: null})
};
fetch('https://api.vturb.com/v1/folders', 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/folders",
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([
'name' => 'Testes',
'kind' => 'ab_tests',
'folder_id' => null
]),
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://api.vturb.com/v1/folders"
payload := strings.NewReader("{\n \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\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://api.vturb.com/v1/folders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/folders")
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 \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0000000000000000000c3",
"name": "Testes",
"kind": "ab_tests",
"folder_id": null,
"created_at": "2026-07-28T12:00:00.000Z",
"updated_at": "2026-07-28T12:00:00.000Z"
}{
"type": "https://docs.vturb.com/errors/bad_request",
"code": "bad_request",
"message": "The request includes fields this endpoint does not accept.",
"field": "id",
"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/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": "folder_id",
"message": "must be a folder of the same kind"
}
]
}Authorizations
Paste your VTurb API token (vt_...). Sent as Authorization: Bearer <token>.
Body
application/json
Response
The created folder. kind (videos or ab_tests, videos when omitted) is set once; folder_id must be a folder of the same kind, and null or omitted creates it at the root.
Was this page helpful?
⌘I
Create a folder
curl --request POST \
--url https://api.vturb.com/v1/folders \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Testes",
"kind": "ab_tests",
"folder_id": null
}
'import requests
url = "https://api.vturb.com/v1/folders"
payload = {
"name": "Testes",
"kind": "ab_tests",
"folder_id": None
}
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({name: 'Testes', kind: 'ab_tests', folder_id: null})
};
fetch('https://api.vturb.com/v1/folders', 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/folders",
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([
'name' => 'Testes',
'kind' => 'ab_tests',
'folder_id' => null
]),
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://api.vturb.com/v1/folders"
payload := strings.NewReader("{\n \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\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://api.vturb.com/v1/folders")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vturb.com/v1/folders")
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 \"name\": \"Testes\",\n \"kind\": \"ab_tests\",\n \"folder_id\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "68b0000000000000000000c3",
"name": "Testes",
"kind": "ab_tests",
"folder_id": null,
"created_at": "2026-07-28T12:00:00.000Z",
"updated_at": "2026-07-28T12:00:00.000Z"
}{
"type": "https://docs.vturb.com/errors/bad_request",
"code": "bad_request",
"message": "The request includes fields this endpoint does not accept.",
"field": "id",
"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/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": "folder_id",
"message": "must be a folder of the same kind"
}
]
}