Rename a personal access token

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://openapi.logto.io/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Logto API references MCP server": {
    "url": "https://openapi.logto.io/mcp"
  }
}

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

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

application/json

Body Required

  • currentName string Required

    The current name of the token to rename.

    Minimum length is 1, maximum length is 256.

  • name string Required

    The new name of the token. It must be unique among the user's personal access tokens.

    Minimum length is 1, maximum length is 256.

Responses

  • 200 application/json

    The personal access token was renamed successfully.

    Hide response attributes Show response attributes object
    • name string Required

      Minimum length is 1, maximum length is 256.

    • createdAt number Required
    • expiresAt number | null Required
  • 400

    The request body is invalid, or the personal access token field is not editable in the account center.

  • 401

    Permission denied, the verification record is invalid or the access token does not include the personal-access-tokens scope.

  • 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.

PATCH /api/my-account/personal-access-tokens
curl \
 --request PATCH 'https://[tenant_id].logto.app/api/my-account/personal-access-tokens' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{
  "currentName": "string",
  "name": "string"
}'
Request examples
{
  "currentName": "string",
  "name": "string"
}
Response examples (200)
{
  "name": "string",
  "createdAt": 42.0,
  "expiresAt": 42.0
}