Skip to main content

UpdateApiKeyDTO

Package: @nauth-toolkit/core Type: DTO (Request)

Update an API key's mutable fields (label and IP allowlist). The secret and expiry are immutable.

import { UpdateApiKeyDTO } from '@nauth-toolkit/nestjs';

Properties​

PropertyTypeRequiredDescription with validation inline
keyIdstringYesExternal key identifier (UUID v4).
namestringNoNew label. Max 255 chars.
allowedIpsstring[]NoReplacement allowlist. Empty array clears restrictions.

Example​

{
"keyId": "550e8400-e29b-41d4-a716-446655440000",
"allowedIps": ["203.0.113.5"]
}

Used By​