---
title: "Rename a personal access token"
method: PATCH
path: "/api/my-account/personal-access-tokens"
tags: ["My account"]
---

# Rename a personal access token

`PATCH /api/my-account/personal-access-tokens`

## Request

- Base URL: `https://[tenant_id].logto.app`
- URL: `https://[tenant_id].logto.app/api/my-account/personal-access-tokens`
- Auth: OAuth 2 (client credentials, token URL `/oidc/token`, scopes: `all`)

Rename a personal access token of the signed-in user. A logto-verification-id in header and the personal-access-tokens scope are required.

## Request body

- object
  - `currentName` string, required: The current name of the token to rename.
  - `name` string, required: The new name of the token. It must be unique among the user's personal access tokens.

## Response `200`

The personal access token was renamed successfully.

- object
  - `name` string, required
  - `createdAt` number, required
  - `expiresAt` number, nullable, required

## Other responses

- `400`: The request body is invalid, or the personal access token field is not editable in the account center.
- `401`: Permission denied, recent user authentication is required or the access token does not include the `personal-access-tokens` scope to rename a personal access token.
- `403`: The request was made by a third-party application.
- `404`: The personal access token was not found.
- `422`: The new token name already exists.

## Changes

- **2026-10-22** `0598176e010d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/logto/apis/logto-api-references/changes/api/my-account/personal-access-tokens/patch.md)

---

[API](https://skmtc.dev/logto/apis/logto-api-references.md) - [All operations](https://skmtc.dev/logto/apis/logto-api-references/llms.txt) - [OpenAPI document](https://skmtc.dev/logto/apis/logto-api-references/revisions/beed1405186a?raw)
