---
title: "Update user's details"
method: PATCH
path: "/iam/users/{userId}"
tags: ["Users"]
---

# Update user's details

`PATCH /iam/users/{userId}`

This method updates user's details.

## Path parameters

- `userId` integer, required

## Request body

- PutUser
  - `id` integer — User's ID.
  - `email` string, email — User's email address.
  - `name` string, nullable — User's name.
  - `lang` 'de' | 'en' | 'ru' | 'zh' | 'az' — User's language. Defines language of the control panel and email messages.
  - `phone` string, nullable — User's phone.
  - `reseller` integer — Services provider ID.
  - `client` number — User's account ID.
  - `deleted` boolean — Deletion flag. If `true` then user was deleted.
  - `activated` boolean — Email confirmation: - `true` – user confirmed the email; - `false` – user did not confirm the email.
  - `sso_auth` boolean — SSO authentication flag. If `true` then user can login via SAML SSO.
  - `two_fa` boolean — Two-step verification: - `true` – user enabled two-step verification; - `false` – user disabled two-step verification.
  - `auth_types` AuthType[] — System field. List of auth types available for the account.
  - `user_type` 'common' | 'reseller' | 'seller' — User's type.
  - `is_active` boolean — User activity flag.
  - `client_and_roles` object[] — List of user's clients. User can access to one or more clients.
    - `client_id` integer, required
    - `client_company_name` string, required
    - `user_roles` string[], required — User role in this client.
    - `user_id` integer, required — User's ID.

## Response `200`

OK.

- User
  - `id` integer, required — User's ID.
  - `email` string, email, required — User's email address.
  - `name` string, nullable, required — User's name.
  - `lang` 'de' | 'en' | 'ru' | 'zh' | 'az', required — User's language. Defines language of the control panel and email messages.
  - `phone` string, nullable, required — User's phone.
  - `company` string, required — User's company.
  - `reseller` integer, required — Services provider ID.
  - `client` number, required — User's account ID.
  - `deleted` boolean, required — Deletion flag. If `true` then user was deleted.
  - `groups` Group[], required — User's group in the current account. IAM supports 5 groups: - Users - Administrators - Engineers - Purge and Prefetch only (API) - Purge and Prefetch only (API+Web)
    - `id` integer — Group's ID: Possible values are: - 1 - Administrators* 2 - Users* 5 - Engineers* 3009 - Purge and Prefetch only (API+Web)* 3022 - Purge and Prefetch only (API)
    - `name` 'Users' | 'Administrators' | 'Engineers' | 'Purge and Prefetch only (API)' | 'Purge and Prefetch only (API+Web)' — Group's name.
  - `activated` boolean, required — Email confirmation: - `true` – user confirmed the email; - `false` – user did not confirm the email.
  - `sso_auth` boolean, required — SSO authentication flag. If `true` then user can login via SAML SSO.
  - `two_fa` boolean, required — Two-step verification: - `true` – user enabled two-step verification; - `false` – user disabled two-step verification.
  - `auth_types` AuthType[], required — System field. List of auth types available for the account.
  - `user_type` 'common' | 'reseller' | 'seller', required — User's type.
  - `is_active` boolean, required — User activity flag.
  - `client_and_roles` object[], required — List of user's clients. User can access to one or more clients.
    - `client_id` integer, required
    - `client_company_name` string, required
    - `user_roles` string[], required — User role in this client.
    - `user_id` integer, required — User's ID.

## Other responses

- `400` — Update user's details failed.
- `403` — The specified user has issued a token with a higher role. Try using another role.
- `404` — User not found.

---

[API](https://skmtc.net/g-core/apis/gcore-openapi.md) · [All operations](https://skmtc.net/g-core/apis/gcore-openapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/g-core/gcore-openapi/revisions/09e652815095/schema)
