v1

latestOpenAPI 3.0.3AGPL-3.0-or-later2026-07-2687268192.4 KB
User Management

Update a user by ID

Updates a subset of user-level attributes.

Other sub-resources (e.g. emails, credentials) are managed via dedicated endpoints and are not updated via this endpoint.

patch/users/{id}

Path parameters

idstring uuid4 required
Example:c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c

ID of the user

Request body

usernamestring nullable

Set a new username for the user.

Send null to remove the username.

namestring nullable

Set a new username for the user.

Send null to remove the name.

given_namestring nullable

Set a new given name for the user.

Send null to remove the given_name.

family_namestring nullable

Set a new family name for the user.

Send null to remove the family_name.

picturestring uri nullable

Set a new picture for the user. Must be a public URL accessible via HTTP/HTTPS. Must not contain credentials.

Send null to remove the picture.

Example request

{
  "username": "john_doe_123",
  "name": "John Doe",
  "given_name": "John",
  "family_name": "Doe"
}

Response

Details about the user

idstring uuid4
user_idstring uuid4
created_atstring date-time

Time of creation of the the user

updated_atstring date-time

Time of last update of the user

namestring
given_namestring
family_namestring
picturestring uri
passwordstring

The actual password, its minLength defaults to 8 but can be configured through the password.min_password_length option.

Example response

{
  "id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "user_id": "c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c",
  "emails": [
    {
      "id": "5333cc5b-c7c4-48cf-8248-9c184ac72b65",
      "address": "john.doe@example.com",
      "is_verified": true,
      "is_primary": false
    }
  ],
  "passkeys": [
    {
      "id": "5333cc5b-c7c4-48cf-8248-9c184ac72b65",
      "name": "iCloud",
      "public_key": "pQECYyagASFYIBblARCP_at3cmprjzQN1lJ...",
      "attestation_type": "packed",
      "aaguid": "01020304-0506-0708-0102-030405060708",
      "last_used_at": "2026-02-24T21:40:36.26936Z",
      "created_at": "2026-02-24T21:40:36.26936Z",
      "transports": [
        "internal"
      ],
      "backup_eligible": true,
      "backup_state": true,
      "mfa_only": false
    }
  ],
  "security_keys": [
    {
      "id": "f826013e-e7e3-4366-a6d8-9359effc8cdd",
      "name": "Yubikey Bio",
      "public_key": "aNMEEyadASFYIBblARCP_at3cmp4gg3zQN1lJ...",
      "attestation_type": "packed",
      "aaguid": "90636e1f-ef82-43bf-bdcf-5255f139d12f",
      "last_used_at": "2026-02-24T21:40:36.26936Z",
      "created_at": "2026-02-24T21:40:36.26936Z",
      "transports": [
        "usb"
      ],
      "backup_eligible": true,
      "backup_state": false,
      "mfa_only": true
    }
  ],
  "metadata": {
    "public_metadata": {
      "role": "admin"
    },
    "unsafe_metadata": {
      "birthday": "2025-05-12"
    }
  },
  "password": "9UnCBEx924a45P7p"
}