All Products
Search
Document Center

Identity as a Service:CreateUser

Last Updated:Aug 08, 2025

You can call the CreateUser operation to create an EIAM account in a specified organization.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

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

email

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: The global policy takes precedence. The instance-level password initialization policy is used. This means the password initialization policy that you set for this operation is invalid. For more information, see the password initialization policy.

  • custom: The custom policy takes precedence. The password initialization policy that you define for this operation is used. This includes whether to enable forced password change, the password initialization method, and the notification channels.

global

passwordForcedUpdateStatus

string

No

The status of the forced password change. It is disabled by default. Valid values:

  • enabled: Enabled.

  • disabled: Disabled.

enabled

userNotificationChannels

array

No

The notification channels for the password. Valid values:

  • email: Email.

  • sms: Text message.

sms

string

No

The notification channel for the password.

email

passwordInitializationType

string

No

The password initialization method. Valid values:

  • random: Random.

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.