JWT Bearer tokens
JWT authentication uses a short-lived access token paired with a longer-lived refresh token. You obtain both by logging in, attach the access token to every request, and exchange the refresh token for a new access token when it expires.Log in and retrieve tokens
Send your credentials toPOST /api/v1/auth/login:
Attach the token to requests
Include the access token in theAuthorization header on every protected request:
Token expiry
Refresh an access token
When your access token expires, use your refresh token to obtain a new one without requiring the user to log in again:accessToken (and optionally a new refreshToken). Update your stored tokens accordingly. If the refresh token itself has expired, the user must log in again.
API keys
API keys are suitable for automated pipelines, CI/CD integrations, and any context where a long-lived credential is preferable to managing token refresh cycles. A key is scoped to specific permissions and optionally tied to an expiry date.Create an API key
You must be authenticated with a valid Bearer token to create an API key. Send aPOST request to /api/v1/apikey/createapikey:
Attach the key to requests
Include the API key in theX-API-Key header:
Manage existing keys
All key management endpoints require Bearer token authentication.
Rotate generates a new raw key value for an existing key record and invalidates the previous value. Revoke disables the key without deleting it. Delete permanently removes the key.
Using both methods side by side
- Bearer token
- API key
Use Bearer tokens for user-facing requests and interactive sessions.
Rate limits
Scrubbe enforces rate limits per route group to protect service availability. Requests that exceed a limit receive429 Too Many Requests.
When a limit is exceeded, the response body is:
RateLimit-* headers so you can inspect the current window and remaining quota programmatically.
Common authentication errors
All error responses follow the standard format: