Herald
OpenapiApi keys

Update an API Key

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

PUT
/api/api-keys/{realmId}/{apiKeyId}

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

Path Parameters

realmId*string

Realm ID

apiKeyId*string

API Key ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/api-keys/string/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "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"    }  ]}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}
{  "code": "string",  "details": null,  "message": "string",  "requestId": "string",  "status": 0}