latestOpenAPI 3.0.32026-08-10234358.4 KB

3d5d69795558

ApiKeys

Rotate an API key

Generate a new secret for an existing API key, invalidating the old secret. Optionally update alias, description, and expiration date.

post/user-service/api-keys/{keyId}/rotate

Request body

aliasstring nullable

Human-readable alias for the API key

descriptionstring nullable

Description of the API key's purpose

expires_atstring date-time nullable

When the API key should expire (must be in the future, RFC3339 format)

Response

API key rotated successfully

idstring uuid required

Unique identifier for the API key

keystring required

The key identifier (defaults to id for legacy keys, can be updated to any string value)

is_legacyboolean required

Whether this is a legacy API key

account_idstring required

Account identifier this API key belongs to

type'TEAM' | 'USER' required

Type of API key (scope)

user_idstring uuid nullable

User ID if this is a user-scoped API key

user_namestring nullable

Name of the user if this is a user-scoped API key

team_idstring uuid nullable

Team ID if this is a team-scoped API key

team_namestring nullable

Name of the team if this is a team-scoped API key

aliasstring nullable

Human-readable alias for the API key

descriptionstring nullable

Description of the API key's purpose

expires_atstring date-time nullable

When the API key expires

last_usedstring date-time nullable

When the API key was last used for authentication

created_bystring uuid nullable

User ID of the person who created this API key

created_by_namestring nullable

Name of the user who created this API key

created_atstring date-time required

When the API key was created

updated_atstring date-time

When the API key was last updated