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.
- NestJS
- Express
- Fastify
import { UpdateApiKeyDTO } from '@nauth-toolkit/nestjs';
import { UpdateApiKeyDTO } from '@nauth-toolkit/core';
import { UpdateApiKeyDTO } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description with validation inline |
|---|---|---|---|
keyId | string | Yes | External key identifier (UUID v4). |
name | string | No | New label. Max 255 chars. |
allowedIps | string[] | No | Replacement allowlist. Empty array clears restrictions. |
Example
{
"keyId": "550e8400-e29b-41d4-a716-446655440000",
"allowedIps": ["203.0.113.5"]
}