Databases
Create Database

Create Database

Create a new PostgreSQL database instance.

Endpoint

POST /v1/databases

Request

curl -X POST https://api.cloudheed.com/v1/databases \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-app-db",
    "region": "fsn1",
    "tier": "micro",
    "version": "17"
  }'

Parameters

FieldTypeRequiredDescription
namestringYesDatabase name (3-63 chars, lowercase, alphanumeric, hyphens)
regionstringYesRegion code (see below)
tierstringYesInstance tier (see below)
versionstringNoPostgreSQL version (default: 17)

Response

{
  "id": "db-abc123",
  "name": "my-app-db",
  "type": "postgres",
  "region": "fsn1",
  "tier": "micro",
  "version": "17",
  "status": "provisioning",
  "host": "db-abc123.db.cloudheed.cloud",
  "port": 5432,
  "database": "postgres",
  "username": "cloudheed",
  "password": "generated-secure-password",
  "connection_string": "postgresql://cloudheed:[email protected]:5432/postgres?sslmode=require",
  "created_at": "2026-03-17T10:00:00Z"
}
⚠️

Important: The password is only returned once when the database is created. Store it securely!

Available Regions

CodeLocationLatency to EULatency to US
fsn1Falkenstein, Germany~10ms~100ms
nbg1Nuremberg, Germany~10ms~100ms
hel1Helsinki, Finland~20ms~120ms
ashAshburn, Virginia~90ms~10ms
hilHillsboro, Oregon~140ms~20ms
sinSingapore~160ms~180ms

Database Tiers

TiervCPUMemoryStorageConnectionsPrice/mo
free0.25 shared256 MB500 MB3€0
micro2 shared1 GB10 GB60€19.99
small2 shared2 GB20 GB90€39.99
medium2 shared4 GB40 GB120€79.99
large4 dedicated8 GB80 GB160€149.99
xl4 dedicated16 GB160 GB240€299.99
2xl8 dedicated32 GB245 GB380€449.99
4xl16 dedicated64 GB368 GB480€899.99
8xl32 dedicated128 GB600 GB600€1,799.99

PostgreSQL Versions

VersionStatus
18Beta
17Latest (default)
16Supported
14Supported

Naming Rules

  • 3-63 characters
  • Lowercase letters, numbers, and hyphens only
  • Must start with a letter
  • Must end with a letter or number
  • No consecutive hyphens

Connection Example

After creation, connect using the provided credentials:

psql "postgresql://cloudheed:[email protected]:5432/postgres?sslmode=require"

Error Responses

CodeDescription
400Invalid parameters
401Unauthorized
402Payment required (tier limit reached)
409Database name already exists
422Validation error