You can call the CreateUser operation to create an EIAM account in a specified organization.
Try it now
Test
RAM authorization
Request syntax
POST /v2/{instanceId}/{applicationId}/users HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Authorization |
string |
Yes |
The authentication information. Format: Bearer ${access_token}. Example: Bearer ATxxxx. |
Bearer AT8csE2seYxxxxxij |
| instanceId |
string |
Yes |
The instance ID. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| applicationId |
string |
Yes |
The application ID. |
app_mkv7rgt4d7i4u7zqtzev2mxxxx |
| body |
object |
No |
The request body. |
app_xx001 |
| username |
string |
Yes |
The account name. It can contain letters, digits, and the following special characters: _, ., @, and -. The maximum length is 64 characters. |
name001 |
| displayName |
string |
No |
The display name of the account. The maximum length is 64 characters. |
display_name001 |
| password |
string |
No |
The password of the account. For password rules, see the password policy in the IDaaS console. |
xxxxx |
| phoneRegion |
string |
No |
The area code for the phone number. Example: The area code for mainland China is 86. Do not include 00 or +. This parameter is required if you set a phone number. |
86 |
| phoneNumber |
string |
No |
The phone number of the account. It must be 6 to 15 digits in length. |
156xxxxxxx |
| phoneNumberVerified |
boolean |
No |
Indicates whether the phone number is verified. If you set a phone number, you must set this field. For most cases, you can set this to true. |
true |
|
string |
No |
The email address. The prefix of the email address can contain uppercase letters, lowercase letters, digits, periods (.), underscores (_), or hyphens (-). The maximum length is 64 characters. |
example@example.com |
|
| emailVerified |
boolean |
No |
Indicates whether the email address is verified. If you set an email address, you must set this field. For most cases, you can set this to true. |
true |
| userExternalId |
string |
No |
The external ID of the account. It is used to associate the account with an external system. The maximum length is 64 characters. If you do not set this parameter, the account ID is used by default. |
user_d6sbsuumeta4h66ec3il7yxxxx |
| primaryOrganizationalUnitId |
string |
Yes |
The ID of the primary organization. |
ou_wovwffm62xifdziem7an7xxxxx |
| description |
string |
No |
The description of the account. The maximum length is 256 characters. |
test user |
| passwordInitializationConfig |
object |
No |
The password initialization configuration. |
|
| passwordInitializationPolicyPriority |
string |
No |
The priority of the password initialization policy. By default, this parameter does not take effect. Valid values:
|
global |
| passwordForcedUpdateStatus |
string |
No |
The status of the forced password change. It is disabled by default. Valid values:
|
enabled |
| userNotificationChannels |
array |
No |
The notification channels for the password. Valid values:
|
sms |
|
string |
No |
The notification channel for the password. |
|
|
| passwordInitializationType |
string |
No |
The password initialization method. Valid values:
|
random |
| customFields |
array |
No |
The list of custom fields for the account. |
|
|
object |
No |
The object that contains the identifier and value of the custom field. |
||
| fieldName |
string |
No |
The identifier of the custom field. You can view the details of the custom field, including its type and value range, in the console. |
age |
| fieldValue |
string |
No |
The value of the custom field. |
fieldValue_001 |
Response parameters
|
Parameter |
Type |
Description |
Example |
|
object |
The response. |
||
| userId |
string |
The account ID. |
user_d6sbsuumeta4h66ec3il7yxxxx |
Examples
Success response
JSON format
{
"userId": "user_d6sbsuumeta4h66ec3il7yxxxx"
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.