All Products
Search
Document Center

Identity as a Service:CreateUser

Last Updated:Mar 31, 2026

Creates a new 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

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

Yes

The ID of the instance.

idaas_ue2jvisn35ea5lmthk267xxxxx

applicationId

string

Yes

The ID of the application.

app_mkv7rgt4d7i4u7zqtzev2mxxxx

Request parameters

Parameter

Type

Required

Description

Example

Authorization

string

Yes

The authentication 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. The maximum length is 128 characters.

display_name001

password

string

No

The account password. For password complexity rules, see the password policy in the IDaaS console.

xxxxx

phoneRegion

string

No

The phone region code. For example, the code for the Chinese mainland is 86. Do not include a 00 prefix or a plus sign (+). This parameter is required if phoneNumber is set.

86

phoneNumber

string

No

The account phone number. It must be 6 to 15 digits long.

156xxxxxxx

phoneNumberVerified

boolean

No

Specifies whether the phone number is verified. This parameter is required if phoneNumber is set. Typically, set this to true.

true

email

string

No

The email address. The local-part of the address 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 is verified. This parameter is required if email is set. Typically, set this to true.

true

userExternalId

string

No

The external user ID, used to associate the account with an external system. The maximum length is 128 characters. If unspecified, it defaults to the account ID.

user_d6sbsuumeta4h66ec3il7yxxxx

primaryOrganizationalUnitId

string

Yes

The ID of the primary organizational unit.

ou_wovwffm62xifdziem7an7xxxxx

description

string

No

The account description. The maximum length is 256 characters.

测试账户

passwordInitializationConfig

object

No

The password initialization configuration.

passwordInitializationPolicyPriority

string

No

The priority of the password initialization policy. Valid values:

  • global: Uses the instance-level password initialization policy and ignores the custom settings in this request. For more information, see the password initialization policy configuration in the IDaaS console.

  • custom: Uses the custom password initialization policy defined in this request. This includes settings for forced password updates, the initialization type, and notification channels.

global

passwordForcedUpdateStatus

string

No

The password forced update status. By default, this feature is disabled. Valid values:

  • enabled: Enables the feature.

  • disabled: Disables the feature.

enabled

userNotificationChannels

array

No

The user notification channels. Valid values:

  • email: Email

  • sms: SMS

sms

string

No

The user notification channel.

email

passwordInitializationType

string

No

The password initialization type. Valid values:

  • random: A randomly generated password.

random

customFields

array<object>

No

A list of custom fields for the account.

object

No

An object containing the name and value of a custom field.

fieldName

string

No

The name of the custom field. You can view the field's data type and value range in the IDaaS console.

age

fieldValue

string

No

The value of the custom field.

fieldValue_001

Response elements

Element

Type

Description

Example

object

The response object.

userId

string

The user 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.