https://dbhost.app/api/v1/) is authenticated with API keys. Use it from your applications, scripts, and CI/CD pipelines. Paid users can issue either selected-database keys or full-account keys.
API key scope model
Paid users can create two API key scope types:- Selected databases — Recommended least-privilege option. The key only sees and operates on its assigned databases.
- Full account access — Can create and manage every database in the owning account.
DATABASE_NOT_FOUND. Full-account-only routes, such as database creation, return KEY_SCOPE_DENIED when used with a selected-database key.
Base URL
Common cURL examples
List databases visible to the authenticated key:Response format
Most successful responses return JSON. File downloads such as backup exports return the raw attachment body, and some delete routes return204 No Content.
Asynchronous v1 operations return 202 Accepted, preserve a human-readable
message, and include an operation object. Read status with
GET /api/v1/operations/{id}. Operation types are backup, restore,
delete, recover, and clone. Statuses are queued, running,
succeeded, failed, and canceled.
Errors use a standard envelope:
Rate limits
The v1 API applies route-aware limits after authentication and uses shared control-plane PostgreSQL buckets so limits remain consistent across serverless instances. A limited response uses429 RATE_LIMITED and includes
Retry-After plus the applicable rate-limit headers. Clients should honor
Retry-After, add jitter, and avoid retrying non-idempotent requests without an
idempotency key.
Requests are authenticated and rate-limited before their bodies are read.
Resource overview
Account, access and lifecycle:POST /api/v1/databases/{id}/lifecyclePATCH /api/v1/databases/{id}/environmentGET|POST /api/v1/databases/{id}/network/allowlistDELETE /api/v1/databases/{id}/network/allowlist/{entryId}GET|POST /api/v1/databases/{id}/membersPATCH|DELETE /api/v1/databases/{id}/members/{membershipId}GET /api/v1/databases/{id}/invitationsPOST /api/v1/databases/{id}/invitations/{invitationId}/resendDELETE /api/v1/databases/{id}/invitations/{invitationId}GET /api/v1/operations/{id}GET|POST /api/v1/webhooksPOST /api/v1/webhooks/{id}/rotateDELETE /api/v1/webhooks/{id}
DELETE /api/v1/databases/{id}GET /api/v1/databases/deletedGET /api/v1/databases/{id}/deletion-backupPOST /api/v1/databases/{id}/recover
POST /api/v1/databases/{id}/backups/{filename}for a single-login databasePOST /api/v1/databases/{id}/legacy-overlay-restoresfor a single-login database with additional rolesPOST /api/v1/databases/{id}/managed-restoresfor a database with managed SQL roles
POST /api/v1/databases/{id}/cloneclones a single-login database. A database with additional roles is rejected with409 LEGACY_OVERLAY_REQUIRES_V4.
409 CUSTOM_RESTORE_UPLOAD_DISABLED for an authorized database. Use the
database owner role with psql or pg_restore over TLS instead; see
Restore your own dump.
Database creation, collaborator/invitation management, and customer webhooks
require a full-account API key. A selected-database key can use
database-specific lifecycle, environment, network, and backup routes only for
its selected active databases.
Extensions
GET /api/v1/databases/{id}/extensions returns the supported extensions
(citext, pg_trgm, pgcrypto) with the version available on the server and
the version installed in the selected database. A selected-database API key
can read only its assigned database.
To install or upgrade one of them on a database with managed SQL roles, send
POST /api/v1/databases/{id}/extensions/operations with an exact body
{"extension":"citext","kind":"install"} (or pg_trgm, pgcrypto /
upgrade) and a stable Idempotency-Key header. The response provides an
operation ID for
GET /api/v1/databases/{id}/extensions/operations/{operationId}. Check a
pending or uncertain outcome by that ID; sending a new key requests a
different operation. See PostgreSQL extensions.