PUT
/v2/pats/{id}/regenerateRegenerate a personal access token
Regenerates a personal access token (PAK), creating a new token value and updating its expiration. Supply expiresAt as an epoch timestamp in milliseconds, or use null for a token that never expires.
idintegerrequired
The numeric ID of the personal access token to regenerate.
Optional expiration configuration for the regenerated personal access token.
expiresAtintegeroptional
Expiration date in epoch format (milliseconds). When null key never expires.
200Returns the regenerated token value, its PAK ID and description, and available creation, update, expiration, and last-used timestamps.
createdAtintegerrequired
descriptionstringrequired
expiresAtintegeroptional
idintegerrequired
lastUsedAtintegeroptional
tokenstringrequired
updatedAtintegerrequired
400Returned when the request is malformed or `expiresAt` is invalid.
codestringrequired
paramsarray<object>optional
401Returned when the request is not authenticated.
codestringrequired
paramsarray<object>optional
403Returned when the authenticated user cannot regenerate the PAK.
codestringrequired
paramsarray<object>optional
404Returned when no PAK exists with the given `id`.
codestringrequired
paramsarray<object>optional
Error handling
A 400 is returned when the request is malformed or expiresAt is not a valid epoch timestamp in milliseconds or null. A 401 indicates that the request is not authenticated, and a 403 indicates that the authenticated user cannot regenerate the token. A 404 is returned when the id path parameter does not identify an existing PAK.