curl --request POST \
--url https://api.rafftechnologies.com/api/v1/databases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Project-ID: <x-project-id>' \
--data '
{
"name": "orders-db",
"plan_id": 5,
"engine": "postgres",
"engine_version": "16",
"storage_gb": 123,
"ha_enabled": false,
"replica_count": 0,
"region": "us-east",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_access": false,
"engine_config": {}
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/databases"
payload = {
"name": "orders-db",
"plan_id": 5,
"engine": "postgres",
"engine_version": "16",
"storage_gb": 123,
"ha_enabled": False,
"replica_count": 0,
"region": "us-east",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_access": False,
"engine_config": {}
}
headers = {
"X-Project-ID": "<x-project-id>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Project-ID': '<x-project-id>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'orders-db',
plan_id: 5,
engine: 'postgres',
engine_version: '16',
storage_gb: 123,
ha_enabled: false,
replica_count: 0,
region: 'us-east',
vpc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
public_access: false,
engine_config: {}
})
};
fetch('https://api.rafftechnologies.com/api/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.rafftechnologies.com/api/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' => 'orders-db',
'plan_id' => 5,
'engine' => 'postgres',
'engine_version' => '16',
'storage_gb' => 123,
'ha_enabled' => false,
'replica_count' => 0,
'region' => 'us-east',
'vpc_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'public_access' => false,
'engine_config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Project-ID: <x-project-id>"
],
]);
$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.rafftechnologies.com/api/v1/databases"
payload := strings.NewReader("{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Project-ID", "<x-project-id>")
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/databases")
.header("X-Project-ID", "<x-project-id>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Project-ID"] = '<x-project-id>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"database_id": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "orders-db",
"engine": "postgres",
"engine_version": "16",
"status": "pending",
"status_message": "<string>",
"region": "us-east",
"plan_id": 5,
"storage_gb": 25,
"ha_enabled": true,
"replica_count": 0,
"vpc_id": "<string>",
"public_access": true,
"connection_host": "a1b2c3d4.db.raffusercloud.com",
"connection_port": 6432,
"billing_type": "payg",
"subscription_id": "<string>",
"price_per_hour": 0.010945,
"monthly_price": 7.99,
"public_port": 25060,
"public_dns_hostname": "a1b2c3d4.public.db.raffusercloud.com",
"public_allowlist": [
"203.0.113.0/24"
],
"is_free": true,
"suspended_at": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Payment Required",
"message": "Insufficient balance for subscription"
}{
"error": "Billing validation failed",
"reason": "banned",
"message": "Payment failed. Please update your payment method."
}Create database
Create a managed database. Provisioning is asynchronous: the database is created in status pending and moves through deploying to running. Poll GET /api/v1/databases/{database_id} for progress. A free PostgreSQL or MySQL database is usually running within 10 seconds.
Networking
Databases live on private VPC networking by default. Set vpc_id to place the private endpoint ({database_id}.db.raffusercloud.com) inside an existing VPC, or attach a VPC later via POST /api/v1/databases/{database_id}/vpc. Public access is optional and off by default. TLS is always required.
Engines
- PostgreSQL: pooled endpoint on port 6432 (PgBouncer, transaction mode) plus a direct endpoint on 5432. Nightly base backup with continuous WAL archiving for point-in-time restore.
- MySQL: TLS endpoint on port 3306. Nightly backups plus on-demand backups.
- Valkey: single TLS endpoint on port 6379. Nightly RDB snapshots plus on-demand snapshots. No read replicas; high availability adds a standby with automatic Sentinel failover.
- ClickHouse and Kafka: see the engine catalog for versions. Kafka clients must trust the
ca_certreturned by the connection endpoint.
Pricing
The plan sets the base price. High availability adds 70% of the tier price; storage above the tier allotment is $0.12/GB/month. See GET /api/v1/public/pricing/database for the full catalog.
curl --request POST \
--url https://api.rafftechnologies.com/api/v1/databases \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--header 'X-Project-ID: <x-project-id>' \
--data '
{
"name": "orders-db",
"plan_id": 5,
"engine": "postgres",
"engine_version": "16",
"storage_gb": 123,
"ha_enabled": false,
"replica_count": 0,
"region": "us-east",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_access": false,
"engine_config": {}
}
'import requests
url = "https://api.rafftechnologies.com/api/v1/databases"
payload = {
"name": "orders-db",
"plan_id": 5,
"engine": "postgres",
"engine_version": "16",
"storage_gb": 123,
"ha_enabled": False,
"replica_count": 0,
"region": "us-east",
"vpc_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"public_access": False,
"engine_config": {}
}
headers = {
"X-Project-ID": "<x-project-id>",
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-Project-ID': '<x-project-id>',
'X-API-Key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'orders-db',
plan_id: 5,
engine: 'postgres',
engine_version: '16',
storage_gb: 123,
ha_enabled: false,
replica_count: 0,
region: 'us-east',
vpc_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
public_access: false,
engine_config: {}
})
};
fetch('https://api.rafftechnologies.com/api/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.rafftechnologies.com/api/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' => 'orders-db',
'plan_id' => 5,
'engine' => 'postgres',
'engine_version' => '16',
'storage_gb' => 123,
'ha_enabled' => false,
'replica_count' => 0,
'region' => 'us-east',
'vpc_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'public_access' => false,
'engine_config' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>",
"X-Project-ID: <x-project-id>"
],
]);
$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.rafftechnologies.com/api/v1/databases"
payload := strings.NewReader("{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Project-ID", "<x-project-id>")
req.Header.Add("X-API-Key", "<api-key>")
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.rafftechnologies.com/api/v1/databases")
.header("X-Project-ID", "<x-project-id>")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rafftechnologies.com/api/v1/databases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Project-ID"] = '<x-project-id>'
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"orders-db\",\n \"plan_id\": 5,\n \"engine\": \"postgres\",\n \"engine_version\": \"16\",\n \"storage_gb\": 123,\n \"ha_enabled\": false,\n \"replica_count\": 0,\n \"region\": \"us-east\",\n \"vpc_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"public_access\": false,\n \"engine_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"database": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"database_id": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "orders-db",
"engine": "postgres",
"engine_version": "16",
"status": "pending",
"status_message": "<string>",
"region": "us-east",
"plan_id": 5,
"storage_gb": 25,
"ha_enabled": true,
"replica_count": 0,
"vpc_id": "<string>",
"public_access": true,
"connection_host": "a1b2c3d4.db.raffusercloud.com",
"connection_port": 6432,
"billing_type": "payg",
"subscription_id": "<string>",
"price_per_hour": 0.010945,
"monthly_price": 7.99,
"public_port": 25060,
"public_dns_hostname": "a1b2c3d4.public.db.raffusercloud.com",
"public_allowlist": [
"203.0.113.0/24"
],
"is_free": true,
"suspended_at": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "Payment Required",
"message": "Insufficient balance for subscription"
}{
"error": "Billing validation failed",
"reason": "banned",
"message": "Payment failed. Please update your payment method."
}Authorizations
API key for authentication. Each key is bound to a specific account.
Headers
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Body
Display name, unique within the account
"orders-db"
Pricing plan ID from GET /api/v1/databases/plans
5
Database engine identifier. Defaults to postgres on create; the live catalog (including availability and versions) is GET /api/v1/databases/engines.
postgres, mysql, valkey, clickhouse, kafka "postgres"
Engine major version from the engine catalog. Omit for the default version.
"16"
Storage in GB. Omit to use the plan's included allotment; storage above it bills at $0.12/GB/month.
Enable high availability (+70% of the plan price)
Read replicas (PostgreSQL only; Valkey rejects a count above 0)
Data center region
us-east VPC to place the private endpoint in. Omit to create without VPC connectivity and attach one later via POST /api/v1/databases/{database_id}/vpc.
Enable public access at create time
Engine configuration overrides (allowlisted keys only)
Show child attributes
Show child attributes