Create a key
Choose New API key and configure:
KAOP displays the token at creation. It can also be revealed later from the API keys screen by you
or an administrator, and reveal events are recorded in the
audit log. Store the token in a secret manager and
avoid copying it into source code, build logs, or command history.
Choose the identity
For shared or long-running automation, prefer a service account. A personal key stops
authenticating when the member behind it is suspended.
Use a key
Send the token as a bearer token on each request:Limit a key to specific capabilities
When you create a key through the API,POST /api/v1/api-keys accepts an optional scopes list of
capability names, such as run.read. A scoped key can do only what both its identity’s roles and
its scopes allow. Without scopes, the key has the full access of its identity.
- KAOP rejects the wildcard
*and any value that is not a capability name with a 422. - A scoped key cannot create or reveal a key with broader scopes than its own. KAOP returns a 403.
Expiry
Every API key expires within 30 days of creation, whether it acts as a service account or as you.- When you create a key through the API, an omitted
expires_atsets the expiry to 30 days from now. A laterexpires_atreturns a 400 withexpires_at must be at most 30 days from now. - Keys created before the 30-day limit with no expiry keep working. The Expires column shows them as Never expires. Rotate them: create a new key, switch your caller to it, then revoke the old one.
Key lifecycle
- Status shows whether a key is active, expired, or revoked.
- Last used helps identify keys that can be retired.
- Revoke permanently invalidates the key. Issue and deploy a replacement first if the caller must remain available.
- Revoking a key that created its own service account also disables that per-key account. Revoking a key for an existing service account or member does not disable the underlying identity.
- Disabling the identity behind a key prevents that key from authenticating. Restoring a managed service account restores its still-valid keys; a revoked key stays revoked.
Next steps
Service accounts
Create a durable identity for automation.
Roles & permissions
Control what the identity behind a key can do.
APIs
Explore the endpoints available to authenticated callers.
Audit log
Review key creation, reveal, and revocation events.