CreateUser
Creates an EIAM account in a specified organization.
Try it now
Test
RAM authorization
Request syntax
POST /v2/{instanceId}/{applicationId}/users HTTP/1.1
Path Parameters
|
Parameter |
Type |
Required |
Description |
Example |
| instanceId |
string |
Yes |
The instance ID. |
idaas_ue2jvisn35ea5lmthk267xxxxx |
| applicationId |
string |
Yes |
The application ID. |
app_mkv7rgt4d7i4u7zqtzev2mxxxx |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| Authorization |
string |
Yes |
The authorization information. Format: Bearer ${access_token}. Example: Bearer ATxxxx. |
Bearer AT8csE2seYxxxxxij |
| body |
object |
No |
The request body. |
app_xx001 |
| username |
string |
Yes |
The username. It can contain letters, digits, and the following special characters: underscore (_), period (.), at sign (@), and hyphen (-). The maximum length is 256 characters. |
name001 |
| displayName |
string |
No |
The display name of the account. The maximum length is 128 characters. |
display_name001 |
| password |
string |
No |
The account password. For password rules, refer to the password policy in the IDaaS console. |
ExamplePassword123! |
| phoneRegion |
string |
No |
The region code of the mobile phone number. Example: 86 for the Chinese mainland, without 00 or +. This parameter is required if the mobile phone number is specified. |
86 |
| phoneNumber |
string |
No |
The mobile phone number of the account. It must be 6 to 15 digits in length. |
156xxxxxxx |
| phoneNumberVerified |
boolean |
No |
Specifies whether the mobile phone number is verified. This field is required if the mobile phone number is specified. Set this parameter to true if no special business requirements exist. |
true |
|
string |
No |
The email address. The email prefix can contain uppercase and lowercase letters, digits, periods (.), underscores (_), and hyphens (-). The maximum length is 128 characters. |
example@example.com |
|
| emailVerified |
boolean |
No |
Specifies whether the email address is verified. This field is required if the email address is specified. Set this parameter to true if no special business requirements exist. |
true |
| userExternalId |
string |
No |
The external ID of the account, which is used to associate the account with an external system. The maximum length is 128 characters. If this parameter is not specified, the account ID is used by default. |
user_d6sbsuumeta4h66ec3il7yxxxx |
| primaryOrganizationalUnitId |
string |
Yes |
The ID of the primary organizational unit. |
ou_wovwffm62xifdziem7an7xxxxx |
| description |
string |
No |
The description of the account. The maximum length is 256 characters. |
Test account |
| passwordInitializationConfig |
object |
No |
The password initialization configuration. |
|
| passwordInitializationPolicyPriority |
string |
No |
The password initialization policy priority. By default, this parameter does not take effect. Valid values:
|
global |
| passwordForcedUpdateStatus |
string |
No |
Specifies whether to force the user to change the password. By default, this feature is disabled. 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<object> |
No |
The list of extended fields for the account. |
|
|
object |
No |
The identifier and value object of the extended field. |
||
| fieldName |
string |
No |
The identifier of the extended field. You can view the detailed information of the corresponding extended field value, including the type and value range, in the console. |
age |
| fieldValue |
string |
No |
The value of the extended field. |
fieldValue_001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response result. |
||
| 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.