Create the database
1
Choose an engine
postgresql, mysql, mongodb, or redis.2
Create the instance
3
Store the connection string
Copy the
connectionString from the response and save it as an app environment variable. Minimums: 256 MB memory and 1 GB storage.Treat the connection string as a secret. Never commit it or paste it into logs.
Connect it to an app
Verify the result
- Status:
GET /api/databases/:databaseId— wait forstatus: running - Stats:
GET /api/databases/:databaseId/stats
Common problems
The database is stuck in provisioning
The database is stuck in provisioning
Creation is asynchronous — the response carries an
operationId. Track it with GET /api/databases/:databaseId/operations.The app can't connect to the database
The app can't connect to the database
Confirm the app was restarted after receiving
DATABASE_URL, and that the string points to the right instance.I lost the database password
I lost the database password
Rotate it with
POST /api/databases/:databaseId/rotate-password and update the app’s variable.Next steps
Back up a database
Protect data before risky changes.
Databases reference
Every endpoint in the database lifecycle.

