v2

latestOpenAPI 3.0.1Apache 2.02026-07-2698173135.4 KB
Postgres Clusters

Create Postgres Cluster

Create a Managed Postgres cluster for the organization named in the request body. Provisioning is asynchronous, and a name is generated when one is not supplied.

post/postgres

Request body

disk_size_gbinteger

Disk size in gigabytes.

namestring

Name for the cluster. A name is generated when omitted.

org_slugstring required

Slug of the organization that will own the cluster.

pg_major_version'16' | '17'

Postgres major version.

plan'basic' | 'starter' | 'launch' | 'scale' | 'Performance' required

Plan slug selecting CPU, memory, and disk sizing.

pool_mode'session' | 'transaction'

Connection pooler mode.

postgis_enabledboolean

Enable PostGIS support, required to later enable PostGIS extensions.

regionstring required

Fly region code where the cluster's primary runs.

Example request

{
  "disk_size_gb": 10,
  "org_slug": "my-org",
  "pg_major_version": "17",
  "plan": "basic",
  "pool_mode": "transaction",
  "region": "iad"
}

Response

Cluster accepted for provisioning

Example response

{
  "data": {
    "cpu_kind": "shared",
    "cpus": 2,
    "disk_size_gb": 10,
    "memory_mb": 1024,
    "pg_major_version": "17",
    "plan": "basic",
    "region": "iad",
    "replicas": 1,
    "status": "ready"
  }
}