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.

API keys

All API requests require a Bearer token in the Authorization header:
curl -H "Authorization: Bearer dbh_your_api_key_here" \
  https://dbhost.app/api/v1/databases
DBHost keeps the published Bearer-token flow unchanged for both the REST API and the CLI. The API now also enforces request shaping protections such as body-size limits and route-aware rate limiting for obviously 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:
dbhost auth login --api-key dbh_your_api_key_here

Error responses

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid API key
403KEY_SCOPE_DENIEDKey is valid but lacks the required full-account scope
404DATABASE_NOT_FOUNDDatabase doesn’t exist, isn’t owned by this user, or isn’t visible to this key
413PAYLOAD_TOO_LARGERequest body is larger than the supported API limit
429RATE_LIMITEDToo many requests for the current route or too many unauthorized attempts
If you receive 429 RATE_LIMITED, back off and retry after the number of seconds in the Retry-After header.