Creates a user.
Debugging
Authorization information
Request syntax
POST /v2/user/create 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 number signs (#). | pdsuserid1 |
| 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. Default value: enabled. Valid values:
| enabled |
| role | string | No | The role of the user. Default value: user. Valid values:
If the domain can be divided into subdomains, the subdomain_super_admin and subdomain_admin roles are also supported. Valid values:
| 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 |
| phone | string | No | The phone number. | 13900001111 |
| string | No | The email address. | 123@pds.com | |
| user_data | string | No | The custom data. The data can be up to 1,024 characters in length. | md |
| group_info_list | array<object> | No | The information about the group. | |
| object | No | |||
| group_id | string | No | The group ID. | g123 |
| user_name | string | No | The username. The username can be up to 128 characters in length. | pdsusername |
| description | string | No | The description of the user. The description can be up to 1,024 characters in length. | The VIP user |
Response parameters
Examples
Sample success responses
JSONformat
{
"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
For a list of error codes, visit the Service error codes.
