Skip to main content

API keys

All API requests require a Bearer token in the Authorization header:
Pro and Business use the same Bearer-token flow for the REST API and CLI. The API also enforces request shaping protections such as body-size limits and route-aware rate limiting for abusive traffic.

Creating an API key

  1. Sign in to dbhost.app
  2. Go to Settings
  3. Click Create Key
  4. Choose either Selected databases or Full account access
  5. Copy the key (shown once for that secret)
API key creation requires a Pro or Business plan.
Selected databases is the recommended default and limits the key to only the databases you choose. Full account access can create and manage every database in your account. If you later need a fresh secret for the same key, use Replace key in Settings. The old secret stops working immediately, and the replacement secret is shown once. Selected-database keys cannot create databases. Creating a database requires a full-account key.

Scope behavior

  • GET /api/v1/databases returns only the databases visible to the authenticated key
  • Database-specific routes outside the key’s scope return DATABASE_NOT_FOUND
  • Full-account-only routes, such as database creation, return KEY_SCOPE_DENIED

Using the CLI

Install the CLI, then save your key:

Error responses

If you receive 429 RATE_LIMITED, back off and retry after the number of seconds in the Retry-After header.