All Products
Search
Document Center

Drive and Photo Service:CreateUser

Last Updated:May 27, 2026

Create 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/create HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

domain_id

string

Yes

body

object

No

The request body.

user_id

string

Yes

The user ID. The ID can be up to 64 characters long and must not contain the "#" character.

pdsuserid1

nick_name

string

No

The user's nickname. The nickname cannot exceed 128 characters.

pdsuer

status

string

No

The user status. The default value is enabled.

  • enabled (The user is active)

  • disabled (The user cannot log in)

enabled

role

string

No

The user's role. The default value is user.

  • superadmin: The super administrator.

  • admin: An administrator.

  • user: A standard user.

If the current domain supports subdomains, the subdomain_super_admin and subdomain_admin roles are also available.

Valid values:

  • subdomain_super_admin :

  • subdomain_admin :

  • superadmin :

  • admin :

  • user :

user

avatar

string

No

The user's avatar.

HTTP URLs must start with http:// or https:// and must not exceed 4 KB.

Data URIs must start with data://, be Base64-encoded, and must not exceed 300 KB.

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

phone

string

No

The user's phone number.

13900001111

email

string

No

The user's email address.

123@pds.com

user_data

object

No

User-defined data, which can be up to 1,024 characters long.

md

any

No

group_info_list

array<object>

No

The group information.

object

No

group_id

string

No

The group ID.

g123

user_name

string

No

The username. The maximum length is 128 characters.

pdsusername

description

string

No

The user description. It can be up to 1,024 characters long.

VIP用户

Response elements

Element

Type

Description

Example

object

The response body.

domain_id

string

The domain ID.

bj1

user_id

string

The user ID.

dingding_abc001

avatar

string

The avatar URL.

http://aa.com/1.jpg

created_at

integer

The creation time, represented as a Unix timestamp in milliseconds.

1639762579768

updated_at

integer

The modification time, represented as a Unix timestamp in milliseconds.

1639762579768

nick_name

string

The nickname.

001

user_name

string

The username.

pds

phone

string

The phone number.

13900001111

email

string

The email address.

a@a.com

role

string

The user role. Valid values:

  • superadmin: Super administrator

  • admin: Administrator

  • user: User

Valid values:

  • superadmin :

    Super administrator

  • admin :

    Administrator

  • user :

    User

admin

status

string

The user status. Valid values:

  • disabled: The user is inactive.

  • enabled: The user is active.

Valid values:

  • disabled :

    The user is inactive.

  • enabled :

    The user is active.

enabled

description

string

The user description.

vipuser

default_drive_id

string

The ID of the user's default drive.

1

user_data

object

A key-value object for storing custom user data.

any

The value of a custom data field.

dog

creator

string

The ID of the creator.

user1

Examples

Success response

JSON format

{
  "domain_id": "bj1",
  "user_id": "dingding_abc001",
  "avatar": "http://aa.com/1.jpg",
  "created_at": 1639762579768,
  "updated_at": 1639762579768,
  "nick_name": "001",
  "user_name": "pds",
  "phone": "13900001111",
  "email": "a@a.com",
  "role": "admin",
  "status": "enabled",
  "description": "vipuser",
  "default_drive_id": "1",
  "user_data": {
    "key": "dog"
  },
  "creator": "user1"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.