Create Database
curl --request POST \
--url https://api.vertracloud.app/v1/databases \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": 123,
"ram": 123,
"workspace_id": "<string>",
"snapshot_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/databases"
payload = {
"name": "<string>",
"description": "<string>",
"type": 123,
"ram": 123,
"workspace_id": "<string>",
"snapshot_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
type: 123,
ram: 123,
workspace_id: '<string>',
snapshot_id: '<string>'
})
};
fetch('https://api.vertracloud.app/v1/databases', 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.vertracloud.app/v1/databases",
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' => '<string>',
'description' => '<string>',
'type' => 123,
'ram' => 123,
'workspace_id' => '<string>',
'snapshot_id' => '<string>'
]),
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://api.vertracloud.app/v1/databases"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vertracloud.app/v1/databases")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"id": "00000000000000000000000000000001",
"cluster": 1,
"type": 1,
"name": "MyDatabase",
"description": "I have a description :)",
"owner_id": "123456789012345678",
"owner_plan_id": 1,
"status": "up",
"ram": 1024,
"host": "database.example.com",
"port": 5432,
"offline_since": null,
"last_snapshot": null,
"created_at": "2026-03-20T19:58:00Z",
"updated_at": "2026-03-20T19:58:00Z"
}
}
Databases
Create Database
Creates a new database with the provided engine, RAM and optional snapshot source.
POST
/
v1
/
databases
Create Database
curl --request POST \
--url https://api.vertracloud.app/v1/databases \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": 123,
"ram": 123,
"workspace_id": "<string>",
"snapshot_id": "<string>"
}
'import requests
url = "https://api.vertracloud.app/v1/databases"
payload = {
"name": "<string>",
"description": "<string>",
"type": 123,
"ram": 123,
"workspace_id": "<string>",
"snapshot_id": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
type: 123,
ram: 123,
workspace_id: '<string>',
snapshot_id: '<string>'
})
};
fetch('https://api.vertracloud.app/v1/databases', 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.vertracloud.app/v1/databases",
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' => '<string>',
'description' => '<string>',
'type' => 123,
'ram' => 123,
'workspace_id' => '<string>',
'snapshot_id' => '<string>'
]),
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://api.vertracloud.app/v1/databases"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.vertracloud.app/v1/databases")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/databases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": 123,\n \"ram\": 123,\n \"workspace_id\": \"<string>\",\n \"snapshot_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"response": {
"id": "00000000000000000000000000000001",
"cluster": 1,
"type": 1,
"name": "MyDatabase",
"description": "I have a description :)",
"owner_id": "123456789012345678",
"owner_plan_id": 1,
"status": "up",
"ram": 1024,
"host": "database.example.com",
"port": 5432,
"offline_since": null,
"last_snapshot": null,
"created_at": "2026-03-20T19:58:00Z",
"updated_at": "2026-03-20T19:58:00Z"
}
}
The body is JSON, not multipart — unlike
POST /v1/apps. The database is created empty by
default; to create it from an existing snapshot, send snapshot_id.
string
required
The database display name. Maximum 50 characters.
string
A database description. Maximum 128 characters.
integer
The database engine:
1 (PostgreSQL), 2 (MongoDB), 3 (Redis) or 4 (MySQL).Required when snapshot_id is omitted. When snapshot_id is present, this field is optional; the engine comes from the snapshot resource_type. If provided, it must match or creation fails
with SNAPSHOT_TYPE_MISMATCH.integer
required
The amount of RAM to allocate to the database, in MB. Minimum 1,024 MB (512 MB for Redis,
type: 3).
Provisioned storage is always ram × 3.string
The ID of the workspace to associate with the database, if applicable.
string
Creates the database from an existing database snapshot. The engine comes from the snapshot
resource_type, and its volume is restored after provisioning. If restoration fails after the
database is created, the new database is deleted instead of leaving an empty database that could be
mistaken for the restored copy.Response
object
Details of the created database.
Show Toggle object
Show Toggle object
string
The database ID.
number
The database engine.
string
The database name.
string
The database description.
string
The database owner ID.
string
The database status (for example,
up).number
The amount of RAM allocated to the database, in MB.
string
The database host address.
number
The database port.
string
The database creation timestamp.
string
The timestamp of the last database update.
string | null
The timestamp when the database went offline, if applicable.
string | null
The timestamp of the most recent snapshot, if available.
{
"response": {
"id": "00000000000000000000000000000001",
"cluster": 1,
"type": 1,
"name": "MyDatabase",
"description": "I have a description :)",
"owner_id": "123456789012345678",
"owner_plan_id": 1,
"status": "up",
"ram": 1024,
"host": "database.example.com",
"port": 5432,
"offline_since": null,
"last_snapshot": null,
"created_at": "2026-03-20T19:58:00Z",
"updated_at": "2026-03-20T19:58:00Z"
}
}
Error Responses
string
The error code indicating the reason for failure. Possible values:
VALIDATION_ERROR: The body failed validation (400), including a missingtypewhensnapshot_idis omitted.USER_NOT_FOUND: The request is not authenticated (401).MAX_DATABASES_REACHED: The plan’s database limit has been reached (403).INVALID_RAM_LIMIT:ramis below the minimum for this database type — 1,024 MB, or 512 MB for Redis (400).USER_LIMITS_NOT_FOUND: The owner’s limits could not be loaded (404).INSUFFICIENT_MEMORY: The requested RAM exceeds the memory remaining on the plan (400).SNAPSHOT_NOT_FOUND: Thesnapshot_iddoes not exist or does not belong to the caller (404).SNAPSHOT_TYPE_MISMATCH: The snapshot is for an application, not a database, or the suppliedtypedoes not match its engine (400).SNAPSHOT_TOO_LARGE: The snapshot exceeds the same size limit as database creation (400).DB_CREATION_FAILED: The platform could not provision the database (500).DATABASE_PERSISTENCE_FAILED: The database was created but could not be read back (500).INTERNAL_SERVER_ERROR: An unexpected failure occurred (500).
string
A descriptive message with additional error details. Present for
VALIDATION_ERROR and
INVALID_RAM_LIMIT.{
"code": "INVALID_RAM_LIMIT",
"message": "Minimum RAM for this database type is 1024MB"
}
{
"code": "SNAPSHOT_TYPE_MISMATCH"
}
{
"code": "MAX_DATABASES_REACHED",
"message": "Your plan allows a maximum of 1 database(s)"
}