Herald
OpenapiApi keys

Update an API Key

Partially updates an API key's name, enabled status, or expiration.

PUT
/api/api-keys/{apiKeyId}

Partially updates an API key's name, enabled status, or expiration.

Path Parameters

apiKeyId*string

API Key ID

Request Body

application/json
  1. 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)

Response Body

API Key updated

application/json
  1. 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

Formatuuid
clientAppName?|

Client App display name

createdAt*string

Creation time (ISO 8601)

enabled*boolean

Whether the API key is enabled

expiresAt?|

Optional expiration time (ISO 8601)

id*string

API Key UUID

lastUsedAt?|

Last usage time (ISO 8601)

name*string

Human-readable name

realmId*string

Realm this API key belongs to

roles?array<>

Roles assigned to this API key

Example Request
curl -X PUT 'https://example.com/api/api-keys/string' \
  -H 'Content-Type: application/json' \
  -d '{}'
Example Response
{
  "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"
    }
  ]
}