---
title: "Update Identity"
method: PUT
path: "/v1/identities/{identityId}"
tags: ["Identities"]
---

# Update Identity

`PUT /v1/identities/{identityId}`

## Request

- Base URL: `https://api.anchorbrowser.io`
- URL: `https://api.anchorbrowser.io/v1/identities/{identityId}`
- Auth: API key in header `anchor-api-key`

Updates an existing identity's name, metadata, or credentials.

## Path parameters

- `identityId` string, uuid, required

## Request body

- UpdateIdentityRequest
  - `name` string: Name of the identity
  - `metadata` object: Metadata for the identity
  - `credentials` CredentialData[]: Array of credentials for authentication
    - union
      - UsernamePasswordCredential
        - `type` 'username_password', required: Credential type
        - `username` string, required: Username for authentication
        - `password` string, required: Password for authentication
      - AuthenticatorCredential
        - `type` 'authenticator', required: Credential type
        - `secret` string, required: TOTP secret for authenticator
        - `otp` string: Optional OTP code
      - CustomCredential
        - `type` 'custom', required: Credential type
        - `fields` CustomFieldItem[], required: Array of custom fields
          - `name` string, required: Field name
          - `value` string, required: Field value

## Response `200`

Identity updated successfully

- UpdateIdentityResponse
  - `id` string, uuid: Unique identifier for the identity
  - `name` string: Name of the identity
  - `metadata` object: Metadata associated with the identity
  - `updated_at` string, date-time: Timestamp when the identity was last updated

## Other responses

- `404`: Identity not found
- `500`: Failed to update identity

---

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