Update key metadata (JSON Merge-Patch)

Applies RFC 7396 JSON Merge-Patch to update key metadata fields.

Workflow:

  1. Validates tenant access from JWT.
  2. Updates metadata fields in PostgreSQL.
  3. Publishes audit event to Kafka.

Patchable fields (see AdminKeyMergePatchRequest schema for full details):

  • displayName: Human-readable key name (max 255 chars).
  • description: Key description (max 1000 chars).
  • exportable: Boolean flag for key export permission.
  • expiresAt: Hard expiration UTC timestamp.
  • softLimitExpiration: Soft expiration UTC timestamp (warning threshold).
  • maxUsageLimit: Hard usage counter limit.
  • softUsageLimit: Soft usage counter limit (must be less than maxUsageLimit).

Validation rules:

  • displayName length <= 255 characters.
  • description length <= 1000 characters.
  • softUsageLimit must be strictly less than maxUsageLimit if both are set.
  • Explicit null in the patch deletes the field (standard RFC 7396 semantics).
  • Absent fields leave the current value unchanged.

Authorization: requires scope admin.keys.patch.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
uuid
required
string
required
Query Params
string
Body Params

RFC 7396 JSON Merge-Patch document. Only include fields you wish to change.

Documentation of the set of fields accepted on a key-metadata merge-patch request.
Only include the fields you want to change. Absent fields leave the current value
unchanged. Explicit null deletes the field (standard RFC 7396 semantics).

The controller deserializes the request as a raw JSON document — additional fields
accepted in the future will be documented here without a breaking change.

string

Human-friendly display name shown in the admin console (max 255 chars).

string

Free-text description of the key's purpose (max 1000 chars).

boolean

Whether the public key material can be exported via migration endpoints.

date-time

Hard expiration UTC timestamp. Setting to null removes the expiration. Rejected with 400 if the value is in the past.

date-time

Soft expiration UTC timestamp (warning threshold). Must be strictly before expiresAt.

int32

Hard usage limit. 0 or null means unlimited.

int32

Soft usage limit (warning threshold). Must be strictly less than maxUsageLimit.

Headers
string
enum
Defaults to application/merge-patch+json

Generated from available request content types

Allowed:
Responses
204

Key metadata updated successfully (no content).

406

Not Acceptable — the request Accept header excludes every representation this endpoint produces. Per RFC 9110 §15.5.7 the response carries NO body and NO Content-Type.

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/problem+json