Two auth modes
BlitzBoard uses different credentials for management vs integration:
Public routes only accept keys that start with
bb_live_. A normal login JWT is rejected on the public API.
Public routes expect:
This is not the same as Stripe’s secret key. Stripe uses its own secrets and webhook signatures. BlitzBoard public auth is only for
/v1/blitz-api.Who can manage keys
Only a BlitzBoard super admin (isSystemAdmin) via the admin backend. Organization creators and organization admins cannot create or manage API keys.
Generate an API key
A BlitzBoard super admin issues a key for an organization from the admin side (POST /api-keys on the admin API) with:
bb_live_... value when it is shown — it is only displayed once.
Audit fields on the key:
Manage keys (admin API)
Key management lives on the admin backend, not the public/main app API.Create
POST /api-keys
Response includes apiKey once, plus id, keyPrefix, organizationId, createdBy, and status.
List
GET /api-keys?organizationId=<orgId>
Revoke
DELETE /api-keys/:id
Rotate
POST /api-keys/:id/rotate
Returns a new plaintext apiKey once; the previous secret stops working. createdBy stays the original admin; lastRotatedBy / rotatedAt record who rotated.
Organization scope
Every key is bound to oneorganizationId. On public requests:
ApiKeyGuardvalidates the Bearer key and loads the organization creator as the acting user (for team permissions), plus org context from the key.- Team create/list inject that org automatically.
- Routes with
teamIdensure the team belongs to the key’s organization.
