Create or Update One Folder Rule
curl --request PUT \
--url https://blob.vertracloud.app/v1/rules/{prefix} \
--header 'Content-Type: application/json' \
--data '
{
"visibility": "<string>",
"expire_seconds": 123,
"max_size": 123,
"extensions": [
"<string>"
],
"cache_control": "<string>",
"delete_after_days": 123
}
'import requests
url = "https://blob.vertracloud.app/v1/rules/{prefix}"
payload = {
"visibility": "<string>",
"expire_seconds": 123,
"max_size": 123,
"extensions": ["<string>"],
"cache_control": "<string>",
"delete_after_days": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
visibility: '<string>',
expire_seconds: 123,
max_size: 123,
extensions: ['<string>'],
cache_control: '<string>',
delete_after_days: 123
})
};
fetch('https://blob.vertracloud.app/v1/rules/{prefix}', 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://blob.vertracloud.app/v1/rules/{prefix}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'visibility' => '<string>',
'expire_seconds' => 123,
'max_size' => 123,
'extensions' => [
'<string>'
],
'cache_control' => '<string>',
'delete_after_days' => 123
]),
CURLOPT_HTTPHEADER => [
"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://blob.vertracloud.app/v1/rules/{prefix}"
payload := strings.NewReader("{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://blob.vertracloud.app/v1/rules/{prefix}")
.header("Content-Type", "application/json")
.body("{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/rules/{prefix}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"response": {
"rules": [
{
"prefix": "tmp/",
"delete_after_days": 30,
"active_from": "2026-10-15T12:00:00.000Z",
"created_at": "2026-10-14T12:00:00.000Z"
}
],
"etag": "v3"
}
}
Folder rules
Create or Update One Folder Rule
Creates or changes the rule of one folder prefix, leaving the other rules as they are.
PUT
/
v1
/
rules
/
{prefix}
Create or Update One Folder Rule
curl --request PUT \
--url https://blob.vertracloud.app/v1/rules/{prefix} \
--header 'Content-Type: application/json' \
--data '
{
"visibility": "<string>",
"expire_seconds": 123,
"max_size": 123,
"extensions": [
"<string>"
],
"cache_control": "<string>",
"delete_after_days": 123
}
'import requests
url = "https://blob.vertracloud.app/v1/rules/{prefix}"
payload = {
"visibility": "<string>",
"expire_seconds": 123,
"max_size": 123,
"extensions": ["<string>"],
"cache_control": "<string>",
"delete_after_days": 123
}
headers = {"Content-Type": "application/json"}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
visibility: '<string>',
expire_seconds: 123,
max_size: 123,
extensions: ['<string>'],
cache_control: '<string>',
delete_after_days: 123
})
};
fetch('https://blob.vertracloud.app/v1/rules/{prefix}', 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://blob.vertracloud.app/v1/rules/{prefix}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'visibility' => '<string>',
'expire_seconds' => 123,
'max_size' => 123,
'extensions' => [
'<string>'
],
'cache_control' => '<string>',
'delete_after_days' => 123
]),
CURLOPT_HTTPHEADER => [
"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://blob.vertracloud.app/v1/rules/{prefix}"
payload := strings.NewReader("{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
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.put("https://blob.vertracloud.app/v1/rules/{prefix}")
.header("Content-Type", "application/json")
.body("{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://blob.vertracloud.app/v1/rules/{prefix}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"visibility\": \"<string>\",\n \"expire_seconds\": 123,\n \"max_size\": 123,\n \"extensions\": [\n \"<string>\"\n ],\n \"cache_control\": \"<string>\",\n \"delete_after_days\": 123\n}"
response = http.request(request)
puts response.read_body{
"response": {
"rules": [
{
"prefix": "tmp/",
"delete_after_days": 30,
"active_from": "2026-10-15T12:00:00.000Z",
"created_at": "2026-10-14T12:00:00.000Z"
}
],
"etag": "v3"
}
}
Creates the rule for one folder prefix or changes it, and leaves the other rules alone. Put the prefix in the URL, URL-encoded (for example
A rule needs at least one field besides the prefix; an empty rule returns
tmp%2F). The response is the whole list with its new etag.
Scope: blob:write.
string
required
Folder prefix, URL-encoded. Stored with a trailing
/.VALIDATION_ERROR.
string
Default visibility of new objects in the folder:
public or private.number
Default expiration of each new object, in seconds. At least the plan’s minimum expiration (7 days, or 1 hour on Enterprise-26 or higher).
number
Largest accepted file, 512 bytes to 10 GB.
string[]
Accepted extensions: 1–50 items, each 1–16 lowercase characters (letters and digits), without the dot.
string
Default
cache_control of new objects. no-cache needs Enterprise-26 or higher.number
Delete objects this many days after upload, 1–3650. Applies 24 hours after the rule is saved.
string
The workspace ID, when the blob belongs to a workspace. The call acts on the blob of the workspace owner and needs the
blob:read workspace permission (blob:manage on routes that change data). Leave it out to act on your own blob.Example request
curl -X PUT "https://blob.vertracloud.app/v1/rules/tmp%2F" \
-H "Authorization: Bearer $VERTRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"delete_after_days":30}'
Response
object
The whole rule list and its new etag.
Show properties
Show properties
object[]
Folder rules. The longest matching prefix applies.
string
Folder prefix, always stored with a trailing
/.string
Default visibility of new objects in the folder.
number
Default expiration of each new object, in seconds.
number
Largest accepted file in bytes, 512 B to 10 GB.
string[]
Accepted extensions, 1–50, lowercase, without the dot.
string
Default
cache_control of new objects.number
Objects are deleted this many days after they’re uploaded, 1–3650.
string
When
delete_after_days starts to apply, set by the platform (24 hours after the rule is saved).string
ISO 8601 time the rule was created.
string
Version of the whole rule list. Send it back in
If-Match when you replace the list.{
"response": {
"rules": [
{
"prefix": "tmp/",
"delete_after_days": 30,
"active_from": "2026-10-15T12:00:00.000Z",
"created_at": "2026-10-14T12:00:00.000Z"
}
],
"etag": "v3"
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
AUTH_TOKEN_MISSING(401): NoAuthorizationheader was sent.API_KEY_INVALID(401): The API key doesn’t exist, was revoked, or its secret doesn’t match.API_KEY_SCOPE_DENIED(403): The key lacks the scope this route needs (blob:readorblob:write);details.requirednames it.WORKSPACE_PERMISSION_DENIED(403): Only withworkspace_id: you’re not a member, or your role lacks the blob permission.WORKSPACE_NOT_FOUND(404): Only withworkspace_id: no workspace with that ID, or you’re not a member.BLOB_NAMESPACE_SUSPENDED(403): The account’s blob storage is suspended, or its plan expired. Uploads and other writes are refused from the start of the 72-hour grace period.VALIDATION_ERROR(400): A parameter or body field failed validation.details.pathnames the field.BLOB_RULE_LIMIT(409): Adding this rule would exceed the plan’s rule limit: 5, 10 or 20.PLAN_RESTRICTED_FEATURE(403):cache_controlisno-cacheon a plan below Enterprise-26.
{
"code": "AUTH_TOKEN_MISSING"
}
{
"code": "API_KEY_SCOPE_DENIED"
}
{
"code": "WORKSPACE_NOT_FOUND"
}
{
"code": "VALIDATION_ERROR"
}
{
"code": "BLOB_RULE_LIMIT"
}