Create a user.
Try it now
Test
RAM authorization
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 |
| role |
string |
No |
The user's role. The default value is
If the current domain supports subdomains, the Valid values:
|
user |
| avatar |
string |
No |
The user's avatar. HTTP URLs must start with Data URIs must start with |
http://a.b.c/pds.jpg |
| phone |
string |
No |
The user's phone number. |
13900001111 |
|
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 |
|
string |
The email address. |
a@a.com |
|
| role |
string |
The user role. Valid values:
Valid values:
|
admin |
| status |
string |
The user status. Valid values:
Valid values:
|
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.