Skip to main content
Database routes need a key scoped to all or database. Changes need read_write. Pass teamId to work in a team.

Create a database

POST /databases
string
required
Database name shown in Pxxl.
string
required
postgres, mysql, mariadb, mongodb, redis, dragonfly, keydb, or clickhouse.
string
Short description, up to 500 characters.
string
Connected project.
boolean
default:"false"
Adds the connection URL to the connected project’s environment variables.
boolean
default:"false"
Enables daily backups where supported.
string
Team that owns the database.
string
Optional. Stops a retry from creating a second database.
An unsupported type returns 400 with an allowed list.

Database endpoints

Runtime actions

Usage

GET /databases/{databaseId}/usage returns storage, connection, and transfer totals.

Credentials

Connection passwords are not returned to API keys. GET /databases/{databaseId}/credentials/{field} accepts only a recent signed-in dashboard session and returns 403 for API keys. Copy credentials from the dashboard, or set setDatabaseUrlEnv when you create the database so your project gets the URL directly.