# Update personal access token **PATCH /api/users/{userId}/personal-access-tokens** Update a token for the user by name. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters ### Path parameters - **userId** (string) The unique identifier of the user. ### Body: application/json (object) - **name** (string) The new token name. Must be unique within the user. - **currentName** (string) The current name of the token to update. ## Responses ### 200 The token was updated successfully. #### Body: application/json (object) - **tenantId** (string) - **userId** (string) - **name** (string) - **value** (string) - **createdAt** (number) - **expiresAt** (number | null) ### 400 Bad Request ### 401 Unauthorized ### 403 Forbidden ### 404 Not Found [Powered by Bump.sh](https://bump.sh)