CreateUser
Creates a user.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
gemp:CreateUser |
create |
*All Resource
|
None | None |
Request syntax
POST /user/create HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| body |
object |
No |
The request body. |
|
| ramId |
integer |
No |
The user ID. |
4787654378343 |
| phone |
string |
No |
The mobile phone number. |
1888898**** |
| username |
string |
No |
The username. |
Mr. Zhang |
|
string |
No |
The email address. |
12121****@qq.com |
|
| clientToken |
string |
No |
The idempotency token. |
c26f36de-1ec8-496a-a828-880676c5ef81 |
| roleIdList |
array |
No |
The list of role IDs. |
|
|
integer |
No |
The user role. |
10001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response structure. |
||
| requestId |
string |
The request ID. |
c26f36de-1ec8-496a-a828-880676c5ef81 |
| data |
object |
The returned data. |
|
| userId |
integer |
The user ID. |
1 |
Examples
Success response
JSON format
{
"requestId": "c26f36de-1ec8-496a-a828-880676c5ef81",
"data": {
"userId": 1
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | PhoneAlreadyExists | The specified phone number already exists. | |
| 400 | UserCountExcess | Available users have run out, please upgrade to a higher version. | Available users have run out, please upgrade to a higher version |
| 402 | IdentitySelectionError | Identity selection error | |
| 403 | UserAlreadyExists | The specified user already exists. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.