authentication
Every API request needs a bearer token. Two flavors:
workspace keys (whlk_…) bound to one workspace,
and master keys (whlmk_…) that span every
workspace you're a member of.
| Workspace key | Master key | |
|---|---|---|
| Prefix | whlk_… | whlmk_… |
| Scope | One workspace | Every workspace you're in (including ones you join later) |
| Scopes / permissions | Selected at issue time | Everything you can do as the issuer |
| Best for | Production integrations, third-party tools, least-privilege | Personal automation, scripts, CI tasks where workspace boundaries are friction |
| Blast radius if leaked | Limited to one workspace | Every workspace you're in. Guard like a password. |
| Who can create | Owner/admin in the target workspace | You (no workspace role check) |
Default to workspace keys. Use master only when you actually need cross-workspace access, and prefer revoking + reissuing over passing one around.
/account/api-keyswhlk_... token immediately — it's shown onceForgot to copy? You'll need to revoke the key and create a new one. Whitelabel can't retrieve the full token after creation (we only store an HMAC).
Put the key in the Authorization header on every request:
curl https://app.whitelabel.dev/api/v1/workspaces \
-H "Authorization: Bearer whlk_..."
From Node.js:
const res = await fetch('https://app.whitelabel.dev/api/v1/workspaces', {
headers: { 'Authorization': `Bearer ${process.env.WHITELABEL_API_KEY}` }
})
const json = await res.json()
From Python:
import os, httpx
r = httpx.get(
'https://app.whitelabel.dev/api/v1/workspaces',
headers={'Authorization': f'Bearer {os.environ["WHITELABEL_API_KEY"]}'}
)
whlk_). Each key only sees the workspace it was created under. To work across workspaces, create multiple keys OR use a master key.whlmk_). Bound to your user, not a workspace. Grants access to every workspace you're a member of — including workspaces you join after the key was created. No scope limits; it can do everything you can do.If a key leaks: revoke it at /account/api-keys. Revocation is immediate — within a second the key starts returning 401.
For a rotating workflow:
prod-2026-q3)| Status | Meaning |
|---|---|
401 | Missing, malformed, expired, or revoked key |
403 | Key is valid but lacks permission for this resource |
404 | Resource doesn't exist OR the key's workspace can't see it (we don't distinguish — security) |
429 | Rate limit. Response includes Retry-After header (seconds) |