Creating an API key
- Go to Settings in the sidebar
- Click Create Key
- Enter a label (e.g., “CI/CD pipeline”, “Monitoring script”)
- Choose a scope
- 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.
Key scopes
Selected databases (Recommended)limits the key to only the databases you choose. It can list and manage only those databases.Full account accesscan create and manage every database in your account.
GET /api/v1/databasesreturns only the selected databases- Database-specific routes outside scope return
DATABASE_NOT_FOUND - Full-account-only routes like database creation return
KEY_SCOPE_DENIED
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
Safe rotation checklist
Replace key is an immediate cutover. Use it only when every consumer can be updated at the same time. If you need a zero-downtime rotation, create a second key with the same least-privilege scope, migrate the consumers, verify the new key, and then revoke the old key.- Inventory every script, environment variable, CI job, and secret store that uses the current key.
- Prepare the destination for the new secret before creating or replacing the key.
- Copy the new secret immediately and update every consumer.
- Run a read-only command such as
dbhost databases listfrom the real consumer environment. - Revoke the old key if you used an overlapping second key, then remove the old secret from temporary notes and local shells.
Using API keys
Include the key in theAuthorization header:
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.