Update an API Key
Partially updates an API key's name, enabled status, or expiration.
Partially updates an API key's name, enabled status, or expiration.
apiKeyId*stringAPI Key ID
application/json- body
Request to update an existing API Key
enabled?|Whether the API key is enabled
expiresAt?|Optional expiration time (ISO 8601 string, or null to clear)
name?|Human-readable name (1-100 characters)
API Key updated
application/json- response
API Key list item (never exposes hash or plaintext)
clientAppEnabled?|Whether the bound Client App is enabled. null when the key has no
bound app; false means the key cannot authenticate (the app is the
kill switch) — surfaced as a UI warning.
clientAppId?|Client App this API key is bound to
uuidclientAppName?|Client App display name
createdAt*stringCreation time (ISO 8601)
enabled*booleanWhether the API key is enabled
expiresAt?|Optional expiration time (ISO 8601)
id*stringAPI Key UUID
lastUsedAt?|Last usage time (ISO 8601)
name*stringHuman-readable name
realmId*stringRealm this API key belongs to
roles?array<>Roles assigned to this API key
curl -X PUT 'https://example.com/api/api-keys/string' \
-H 'Content-Type: application/json' \
-d '{}'{
"clientAppEnabled": true,
"clientAppId": "d386372c-64d9-49da-bb8b-4b5eda60f56c",
"clientAppName": "string",
"createdAt": "string",
"enabled": true,
"expiresAt": "string",
"id": "string",
"lastUsedAt": "string",
"name": "string",
"realmId": "string",
"roles": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "string"
}
]
}