Fly.io
Postgres Clusters

Create Database

View as Markdown

Create a database within a specific cluster.

POST
/v1/postgres/{postgres_cluster_id}/databases

Create a database within a specific cluster.

Authorization

bearerAuth
AuthorizationBearer <token>

A Fly.io access token. Create one with fly tokens create.

In: header

Path Parameters

postgres_cluster_id*string

Managed Postgres Cluster ID

Request Body

application/json

Database details

name*string

Name of the database to create.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/postgres/string/databases" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "data": {    "name": "string"  }}
{  "error": "string"}
{  "error": "string"}
{  "error": "string"}