API keys are the primary way to authenticate requests to the Scrubbe API from your own applications, scripts, or integrations. Each key is scoped to a specific environment and a set of permissions, so you can follow the principle of least privilege across your systems.Documentation Index
Fetch the complete documentation index at: https://docs.scrubbe.com/llms.txt
Use this file to discover all available pages before exploring further.
Create an API key
Send aPOST request with a name, environment, permission scopes, and an optional expiry date.
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A human-readable label to identify the key in your dashboard. |
environment | string | Yes | One of PRODUCTION, STAGING, or DEVELOPMENT. |
scopes | array | Yes | List of permission scopes granted to this key. |
expiresAt | string | No | ISO 8601 datetime after which the key is no longer valid. Omit for a non-expiring key. |
key or rawKey. This value is not retrievable again after this response. Store it in a secrets manager (such as AWS Secrets Manager, HashiCorp Vault, or your CI/CD platform’s secret store) before proceeding.
Use an API key in requests
Pass the key in theX-API-Key header on every request that requires authentication.
cURL
Do not include API keys in query parameters or request bodies. Always use the
X-API-Key header to keep the key out of server access logs and browser history.List your API keys
Retrieve metadata for all API keys associated with your account. The raw key value is never returned in this response — only key IDs, names, environments, scopes, and status.cURL
Rotate a key
Rotating a key invalidates the current key value and issues a new one under the same key ID. Use rotation on a regular schedule or immediately if you suspect a key has been exposed.cURL
Revoke a key
Revoking a key disables it without deleting it. A revoked key cannot be used to authenticate requests, but its record remains visible in your key list.cURL
Delete a key
Permanently removes the key and its metadata from your account. This action cannot be undone.cURL
Key management summary
| Action | Endpoint | Effect |
|---|---|---|
| Create | POST /api/v1/apikey/createapikey | Issues a new key; raw value shown once. |
| List | GET /api/v1/apikey/apikeys | Returns key metadata, never raw values. |
| Rotate | POST /api/v1/apikey/:id/rotate | Invalidates old value, issues new one. |
| Revoke | POST /api/v1/apikey/:id/revoke | Disables key; record is preserved. |
| Delete | DELETE /api/v1/apikey/:id | Permanently removes key and record. |