UpdateUser - Update a user

Updated at:

Updates user information.

Important

The new Qoder CN documentation site is now available. Content on this site may not reflect the latest product features and changes. Visit docs.qoder.cn for the latest product documentation.

Supported editions

Enterprise Dedicated Edition

Service endpoints

Get the service endpoint and replace {domain} in the API request syntax with your endpoint.

Authorization

Product

Resource

Required permission

organization settings

user

read and write

Request syntax

PUT https://{domain}/oapi/v1/platform/users/{idOrUsername}

Request

Update by ID

curl -X 'PUT' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/users/029844f4-46cb-47b0-9db4-06c68eaf****' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "name": "Doc Test User 11",
        "password": "password***",
        "email": "doc-test11@example.com",
        "nickName": "Nickname 11",
        "staffId": "10011",
        "sysDeptIds": ["ebeb5a64-c98c-478a-9d9d-513841da****"]
    }'

Update by username

curl -X 'PUT' \
  'https://test-domain-***.rdc.aliyuncs.com/oapi/v1/platform/users/doc-test11' \
  -H 'Content-Type: application/json' \
  -H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484' \
  --data '
    {
        "name": "Doc Test User 11",
        "password": "password***",
        "email": "doc-test11@example.com",
        "nickName": "Nickname 11",
        "staffId": "10011",
        "sysDeptIds": ["ebeb5a64-c98c-478a-9d9d-513841da****"]
    }'

Request headers

x-yunxiao-token string (Required)

The access token. See Access token for details.

Example: pt-0fh3****0fbG_35af****0484.

Request parameters

idOrUsername string (Required)

The user ID or login name.

Specify only one.

name string (Optional)

The display name.

password string (Optional)

The user's password.

email string (Optional)

The email address.

nickName string (Optional)

The user's nickname.

staffId string (Optional)

The user's staff ID.

sysDeptIds array[string] (Optional)

The IDs of the user's departments.

Response parameters

Sample response

{
    "id": "029844f4-46cb-47b0-9db4-06c68eaf****",
    "username": "doc-test11",
    "name": "Doc Test User 11",
    "nickName": "Nickname 11",
    "email": "doc-test11@example.com",
    "staffId": "10011",
    "createdAt": "2025-06-13T05:41:36Z"
}

id string

The user ID.

username string

The login name.

name string

The display name.

nickName string

The user's nickname.

email string

The email address.

staffId string

The user's staff ID.

createdAt string

The time when the user was created.

Error codes

For more information, see Error code center.