Rotate a personal access token
POST/api/v4/users/tokens/rotate
Generate a new secret for an existing personal access token, immediately invalidating the old secret and any sessions that used it. The response includes the new token secret (shown once, like token creation).
Minimum server version: 10.10
Permissions
Must have create_user_access_token permission. For non-self requests, must also have the edit_other_users permission. To rotate a token belonging to a system admin, must also have the manage_system permission. OAuth sessions cannot use this endpoint.
Request
Responses
- 200
- 400
- 401
- 403
- 404
Personal access token rotation successful; response includes the new secret
Invalid or missing parameters in URL or request body
No access token provided
Do not have appropriate permissions
Resource not found