Skip to main content
Creating, disabling and deleting keys takes a dashboard session token (ks-…) in Authorization: Bearer. An API key gets 403 with session_required, so a leaked key cannot mint new keys or switch off yours. Listing keys takes either credential.

Create key

POST https://kymaapi.com/v1/auth/keys
string
Key name (e.g. “production”). Defaults to "default" when omitted.
Response

List keys

GET https://kymaapi.com/v1/auth/keys Newest key first (created_at descending). Each key carries its lifetime spend. Secrets are returned in full to a session token and masked (kyma-a…b1c2) to a caller authenticated with an API key.
Response

Disable or enable a key

PATCH https://kymaapi.com/v1/auth/keys/{key}/toggle
boolean
required
true enables the key. Any other value, or a missing field, disables it.
A disabled key stops authenticating at once.
Response

Delete key

DELETE https://kymaapi.com/v1/auth/keys/{key} Any key can be deleted, including the one marked is_default. Deleting the default promotes your newest enabled key in its place; if no enabled key is left, a new default key is created for you. The response names the key that is default afterwards, masked.
Response
An account always has a default key. new_default_created is true when the delete left none and one was issued for you.
A key that is not yours, or does not exist, answers 400 with {"error": {"message": "Key not found", "reason": "not_found"}}.