Admin Rotate Access Token

post/api/v2/admin/user/{userId}/accesstoken/{tokenId}/rotate

Admin route to rotate an access token to a new one with identical permissions and settings. Expires the old token soon, since it will be replaced with the new one.

Path Parameters

  • userIdstringRequired
    The user ID who owns the access token
  • tokenIdstringRequired
    The access token ID to rotate

200 Response

oldToken object required
id string required
ID of the original access token that was rotated
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
originalExpiresAt string <date-time>required
Original expiration date of the old token
newExpiresAt string <date-time>required
New expiration date of the old token (typically 2 hours from rotation time)
newToken object required
id string required
ID of the new access token
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
expiresAt string <date-time>required
Expiration date of the new token

400 Response

name string
Error code
context object required
Properties that apply to a specific error name
error string required
Human-readable error message
requestId string required
Client request id