curl --request POST \
--url https://api.example.com/api/v1/databasesProvision a new PostgreSQL database.
curl --request POST \
--url https://api.example.com/api/v1/databasesCreates a new PostgreSQL database with its own user, password, and PgBouncer pool entry.Documentation Index
Fetch the complete documentation index at: https://docs.dbhost.app/llms.txt
Use this file to discover all available pages before exploring further.
^[a-z][a-z0-9-]{1,48}[a-z0-9]$ — lowercase letters, numbers, and hyphens, 3-50 characters.| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Database identifier (becomes DB name and username) |
displayName | string | Yes | Human-friendly label |
{
"name": "my-app",
"displayName": "My Application"
}
curl -X POST https://dbhost.app/api/v1/databases \
-H "Authorization: Bearer dbh_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"my-app","displayName":"My Application"}'
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-app",
"displayName": "My Application",
"host": "db.dbhost.app",
"port": 6432,
"database": "my-app",
"username": "my-app",
"password": "generated-secret-token",
"status": "active",
"connectionString": "postgresql://my-app:generated-secret-token@db.dbhost.app:6432/my-app?sslmode=verify-full"
}
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Request body is missing fields or the name is invalid |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | KEY_SCOPE_DENIED | The API key is valid but does not have full account access |
| 403 | PLAN_LIMIT | Your plan does not allow API access or more databases |
| 500 | AGENT_ERROR | The VPS agent failed to create the database |