Authorization header of every HTTP request — no cookies, no OAuth redirects, just a single header.
Create an API key
The easiest way to create an API key is from the API Keys section of your account settings at promptbank.club. Click Create API key, enter a descriptive name (up to 80 characters), and copy the key immediately — it is shown in full only once. See the API Keys reference for the full request and response schema.Use your API key
Pass your API key as a Bearer token in theAuthorization header of every request. The header value follows this pattern:
pb_live_ followed by a public identifier, an underscore, and the secret portion. The full string is what you pass after Bearer.
Scopes
API keys carry permission scopes that control which operations they can perform.
You can verify a key’s assigned scopes by calling
GET /api/v1/api-keys/{keyId}.
Security best practices
A few additional practices to keep your keys secure:- Use one key per environment. Create separate keys for development, staging, and production so you can revoke a single environment’s access without affecting others.
- Apply the principle of least privilege. Only assign the scopes a key actually needs. A key used only for reading prompts should not have
prompts:write. - Audit key usage. Review the list of active API keys periodically and delete any that are no longer in use.
Error reference
The following HTTP status codes relate directly to authentication and access failures.
All error responses follow the standard envelope format:
{ "data": null, "error": "message", "details": {} }.