---
title: "Update profile"
method: PATCH
path: "/api/my-account"
tags: ["My account"]
---

# Update profile

`PATCH /api/my-account`

Update profile for the user, only the fields that are passed in will be updated. Updating or deleting username requires a logto-verification-id header for checking sensitive permissions. Removing any sign-in identifier, including username, is rejected if it would remove the user's last identifier.

## Request body

- object
  - `name` string, nullable — The new name for the user.
  - `avatar` string, url, nullable — The new avatar for the user, must be a URL.
  - `username` string, regex, nullable — The new username for the user, must be a valid username and unique.
  - `customData` object — The new custom data for the user. This will completely replace the existing customData. Requires CustomData scope.

## Response `200`

The profile was updated successfully.

- object
  - `id` string
  - `username` string, nullable
  - `primaryEmail` string, nullable
  - `primaryPhone` string, nullable
  - `name` string, nullable
  - `avatar` string, nullable
  - `customData` object — arbitrary
  - `identities` object
  - `lastSignInAt` number, nullable
  - `createdAt` number
  - `updatedAt` number
  - `profile` object
    - `familyName` string
    - `givenName` string
    - `middleName` string
    - `nickname` string
    - `preferredUsername` string
    - `profile` string
    - `website` string
    - `gender` string
    - `birthdate` string
    - `zoneinfo` string
    - `locale` string
    - `address` object
      - `formatted` string
      - `streetAddress` string
      - `locality` string
      - `region` string
      - `postalCode` string
      - `country` string
  - `applicationId` string, nullable
  - `isSuspended` boolean
  - `hasPassword` boolean
  - `hasSecurityVerificationMethod` boolean
  - `ssoIdentities` object[]
    - `tenantId` string, required
    - `id` string, required
    - `userId` string, required
    - `issuer` string, required
    - `identityId` string, required
    - `detail` object, required — arbitrary
    - `createdAt` number, required
    - `updatedAt` number, required
    - `ssoConnectorId` string, required

## Other responses

- `400` — The request body is invalid.
- `401` — Permission denied, the verification record is invalid.
- `403` — Forbidden
- `422` — The username is already in use.

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/revisions/a163dc77d842/schema)
