Skip to main content
API keys let server-side applications and ingestion pipelines authenticate with Scrubbe without user credentials. Each key is scoped to specific permissions and an environment, so you can apply the principle of least privilege to every integration. All endpoints in this section require Authorization: Bearer <accessToken> and live under /api/v1/apikey.
An API key’s secret value is shown only once immediately after creation. Store it in a secrets manager immediately — it cannot be retrieved again. If lost, rotate or delete the key and create a new one.

POST /apikey/createapikey

Create a new API key scoped to a specific environment and set of permissions.
string
required
A human-readable label for the key. Example: "Production Key".
string
required
Target environment. One of: PRODUCTION, STAGING, DEVELOPMENT.
string[]
required
Array of permission scopes granted to this key. Example: ["incidents:read", "incidents:write"].
string
ISO 8601 expiry timestamp. Omit for a non-expiring key. Example: "2026-12-31T00:00:00Z".
201 response
string
The full API key secret. Shown only once — store it securely before leaving this response.
string
The key ID used for rotate, revoke, and delete operations.

GET /apikey/apikeys

List all API keys for the authenticated user’s workspace. The key secret is not included in list responses.

POST /apikey/:id/rotate

Generate a new secret for an existing key. The old secret is immediately invalidated. The new secret is shown only in the rotation response.
string
required
The ID of the key to rotate.
Automate key rotation on a regular schedule (e.g., every 90 days) to limit the blast radius of a compromised credential.

POST /apikey/:id/revoke

Disable a key immediately without deleting it. The key record is retained for audit purposes but will no longer authenticate requests.
string
required
The ID of the key to revoke.

DELETE /apikey/:id

Permanently delete a key and its audit record. This action cannot be undone.
string
required
The ID of the key to delete.
Deleting a key is irreversible. Prefer revoke if you want to retain the audit trail.

Available scopes