# Update personal access token **PATCH /api/users/{userId}/personal-access-tokens/{name}** Update a token for the user by name using the legacy path parameter. Deprecated: use the PATCH /personal-access-tokens endpoint instead to avoid url name encoding issues. ## 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. - **name** (string) The current name of the token. ## Body parameters Content-type: application/json - **name** (string) The new token name. Must be unique within the user. ## Responses ### 200: The token was updated successfully. #### Body Parameters: 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)