Skip to main content
POST
Provision

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

orgId
string
required

The organization's id (UUID) or slug — either form is accepted.

projectId
string
required

The project's id (UUID) or slug — either form is accepted.

Query Parameters

environment
string

Environment slug to scope this operation to. Defaults to "production". An environment that does not exist on the project answers 404. The database is created in the addressed environment.

Pattern: ^[a-z][a-z0-9-]{0,38}$

Body

application/json
name
string
required

Database name: 2-62 chars of lowercase letters, digits, and hyphens, starting with a letter. Unique within the environment.

Pattern: ^[a-z][a-z0-9-]{1,61}$
sku
string
required

Database SKU id (see the rate card via billing.get). Sizes the dedicated instance. Required — there is no default size.

region
string
required

Database region id (see regions.list). Required; immutable after provisioning.

replicas
enum<integer>

Topology: 0 is single-node; 2 is HA with two replicas. Defaults to 0. HA requires the platform continuous-backup destination to be configured.

Available options:
0,
2

Response

Database provisioned. The connection string is shown once; store it securely. Rotate to obtain a new one.

id
string
required

The database's id — addresses it in every other operation.

name
string
required

Customer-chosen database name — unique within the environment. 2-62 chars of lowercase letters, digits, and hyphens, starting with a letter.

Pattern: ^[a-z][a-z0-9-]{1,61}$
status
enum<string>
required
Available options:
provisioning,
resizing,
ready,
failed
connectionString
string
required

Full postgres:// connection string including the password. Shown exactly once — it is never retrievable later.