Access Tokens
Rotate access token
Generates a new raw token for an existing access token and invalidates the previous raw token immediately. The token id, name, description, permission, will_expire, and expired_at values are preserved.
Requires auth_enabled=true and an admin access token or admin JWT. Expired tokens cannot be rotated.
post/auth/api_key/{token_id}/rotate
Path parameters
token_idinteger required
The unique identifier of the access token to rotate.
Headers
Authorizationstring required
Admin JWT or admin access token. Format Bearer <admin-jwt-or-access-token>.
Response
Token rotated successfully. Returns the new raw token.