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.
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.
Authorization
bearerAuth A Fly.io access token. Create one with fly tokens create.
In: header
Request Body
application/json
Cluster details
Disk size in gigabytes.
Name for the cluster. A name is generated when omitted.
Slug of the organization that will own the cluster.
Postgres major version.
Plan slug selecting CPU, memory, and disk sizing.
Connection pooler mode.
Enable PostGIS support, required to later enable PostGIS extensions.
Fly region code where the cluster's primary runs.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/postgres" \ -H "Content-Type: application/json" \ -d '{ "org_slug": "my-org", "plan": "basic", "region": "iad" }'{ "data": { "attached_apps": [ { "name": "string" } ], "cpu_kind": "shared", "cpus": 2, "created_at": "string", "disk_size_gb": 10, "endpoints": { "primary": { "direct": { "host": "string", "port": 0 }, "pooler": { "host": "string", "port": 0 } } }, "id": "string", "memory_mb": 1024, "name": "string", "organization": { "name": "string", "slug": "string" }, "pg_major_version": "17", "plan": "basic", "postgis_enabled": true, "region": "iad", "replicas": 1, "status": "ready" }}{ "error": "string"}{ "error": "string"}{ "error": "string"}