Skip to main content

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.

Creating an API key

  1. Go to Settings in the sidebar
  2. Click Create Key
  3. Enter a label (e.g., “CI/CD pipeline”, “Monitoring script”)
  4. Choose a scope
  5. Copy the key immediately
API key creation requires a Pro or Business plan. Free users will see an upgrade prompt instead of the create form.
Each full API key secret is shown only once when created or replaced. DBHost stores only a hash plus the visible prefix, so the current secret cannot be recovered later. Save it in a secure location.

Key scopes

  • Selected databases (Recommended) limits the key to only the databases you choose. It can list and manage only those databases.
  • Full account access can create and manage every database in your account.
Selected-database keys cannot create new databases. If your automation needs to provision databases, create a full-access key instead. Selected-database keys also follow least-privilege behavior in the API and CLI:
  • GET /api/v1/databases returns only the selected databases
  • Database-specific routes outside scope return DATABASE_NOT_FOUND
  • Full-account-only routes like database creation return KEY_SCOPE_DENIED
API key scope is immutable in v1. To change scope, revoke the key and create a new one.

Replacing a key

Click Replace key next to an existing key if you need a fresh secret without changing the label or scope bindings.
  • The old secret stops working immediately
  • The new secret is shown once right after replacement
  • The key keeps the same label and scope configuration

Using API keys

Include the key in the Authorization header:
curl -H "Authorization: Bearer dbh_abc123..." \
  https://dbhost.app/api/v1/databases
Or use it with the CLI:
dbhost auth login --api-key dbh_abc123...

Key format

API keys have a visible prefix (e.g., dbh_abc1) for identification and a secret portion. In the settings page, you’ll see the prefix, label, scope, and last-used timestamp.

Revoking a key

Click Revoke next to any key in the settings page. The key stops working immediately.