All Products
Search
Document Center

Drive and Photo Service:UpdateUser

Last Updated:Mar 26, 2026

Modifies the information about a user.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST /v2/user/update HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

body

object

No

The request parameters.

user_id

string

Yes

The user ID. The ID can be up to 64 characters in length and cannot contain a number sign (#).

c9b7a5aa04d14ae3867fdc886fa01da4

nick_name

string

No

The nickname of the user. The nickname can be up to 128 characters in length.

pdsuer

status

string

No

The state of the user. Valid values:

  • disabled: The user is prohibited from logon.

  • enabled: The user is in a normal state.

Valid values:

  • disabled :

    Disabled

  • enabled :

    Enabled

enabled

role

string

No

The role of the user. Valid values:

  • superadmin

  • admin

  • user

Valid values:

  • superadmin :

    Super administrator

  • admin :

    Administrator

  • user :

    Regular user

user

avatar

string

No

The URL of the profile picture.

If you specify the parameter in the HTTP URL format, the URL must start with http:// or https:// and can be up to 4 KB in size.

If you specify the parameter in the DATA URL format, the URL must start with data:// and be encoded in Base64. The URL can be up to 300 KB in size.

http://a.b.c/pds.jpg

description

string

No

The description of the user. The description can be up to 1,024 characters in length.

vipUser

phone

string

No

The mobile number of the user.

13900001111

email

string

No

The email address of the user.

a@aliyunpds.com

user_data

object

No

The custom data. The data can be up to 1,024 characters in length.

string

No

The custom data.

test

group_info_list

array<object>

No

The information about the group.

object

No

group_id

string

No

The group ID.

g123

Response elements

Element

Type

Description

Example

User

The information about the user.

Examples

Success response

JSON format

{
  "domain_id": "bj1",
  "user_id": "c9b7a5aa04d14ae3867fdc886fa01da4",
  "avatar": "http://aa.com/1.jpg",
  "created_at": 1639762579768,
  "updated_at": 1639762579768,
  "email": "a@aliyunpds.com",
  "nick_name": "001",
  "phone": "13900001111",
  "role": "user",
  "status": "enabled",
  "user_name": "pds",
  "description": "vipuser",
  "default_drive_id": "1",
  "user_data": {
    "key": ""
  },
  "creator": "user1",
  "punishments": [
    {
      "punish_flag": 0,
      "starts_at": "",
      "ends_at": "",
      "impermanent": true
    }
  ],
  "is_sync": true
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.