Updated on 2024-04-10 GMT+08:00

Creating a User

Function

This API is used to create an IAM Identity Center user in the specified identity source.

URI

POST /v1/identity-stores/{identity_store_id}/users

Table 1 Path parameters

Parameter

Mandatory

Type

Description

identity_store_id

Yes

String

Globally unique ID of the identity source

Minimum length: 12

Maximum length: 12

Request Parameters

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

X-Security-Token

No

String

Security token (session token) of your temporary security credentials. If a temporary security credential is used, this header is required.

Maximum length: 2048

Table 3 Parameters in the request body

Parameter

Mandatory

Type

Description

addresses

No

Array of objects

Address list of a user

Array length: 1-1

display_name

Yes

String

Display name of a user

Minimum length: 1

Maximum length: 1024

emails

Yes

Array of objects

Email address list of a user

Array length: 1-1

locale

No

String

Geographical area or location of a user

Minimum length: 1

Maximum length: 1024

name

Yes

Object

Name of a user

nickname

No

String

Nickname of a user

Minimum length: 1

Maximum length: 1024

phone_numbers

No

Array of objects

Phone number list of a user

Array length: 1-1

preferred_language

No

String

User's preferred language

Minimum length: 1

Maximum length: 1024

profile_url

No

String

URL associated with a user

Minimum length: 1

Maximum length: 1024

timezone

No

String

User time zone

Minimum length: 1

Maximum length: 1024

title

No

String

User title

Minimum length: 1

Maximum length: 1024

user_name

Yes

String

Username, which uniquely identifies a user

Minimum length: 2

Maximum length: 128

user_type

No

String

User type

Minimum length: 1

Maximum length: 1024

password_mode

Yes

String

Password initialization mode, which can be one-time password or email address

Enumerated value:

  • OTP
  • EMAIL

enterprise

No

Object

Object that contains the user's work-related information

Table 4 addresses

Parameter

Mandatory

Type

Description

country

No

String

Country or region

Minimum length: 1

Maximum length: 1024

formatted

No

String

Formatted address to be displayed

Minimum length: 1

Maximum length: 1024

locality

No

String

Location

Minimum length: 1

Maximum length: 1024

postal_code

No

String

Postal code

Minimum length: 1

Maximum length: 1024

primary

No

Boolean

Whether the address is the user's primary address

region

No

String

Region

Minimum length: 1

Maximum length: 1024

street_address

No

String

Street

Minimum length: 1

Maximum length: 1024

type

No

String

Address type

Minimum length: 1

Maximum length: 1024

Table 5 emails

Parameter

Mandatory

Type

Description

primary

Yes

Boolean

Whether the value is the user's primary email address

type

Yes

String

Email address type

Minimum length: 1

Maximum length: 1024

value

Yes

String

Email address

Minimum length: 1

Maximum length: 1024

verification_status

No

String

Verification status of an email address

Enumerated value:

  • NOT_VERIFIED
  • VERIFIED
Table 6 name

Parameter

Mandatory

Type

Description

family_name

Yes

String

Family name of a user

Minimum length: 1

Maximum length: 1024

formatted

No

String

Formatted name to be displayed

Minimum length: 1

Maximum length: 1024

given_name

Yes

String

Given name of a user

Minimum length: 1

Maximum length: 1024

honorific_prefix

No

String

Prefix of a user name

Minimum length: 1

Maximum length: 1024

honorific_suffix

No

String

Suffix of a user name

Minimum length: 1

Maximum length: 1024

middle_name

No

String

Middle name of a user

Minimum length: 1

Maximum length: 1024

Table 7 phone_numbers

Parameter

Mandatory

Type

Description

primary

No

Boolean

Whether the value is the user's primary phone number

type

No

String

Phone number type

Minimum length: 1

Maximum length: 1024

value

No

String

Phone number

Minimum length: 1

Maximum length: 1024

Table 8 enterprise

Parameter

Mandatory

Type

Description

cost_center

No

String

Cost center

Minimum length: 1

Maximum length: 1024

department

No

String

Department

Minimum length: 1

Maximum length: 1024

division

No

String

Division

Minimum length: 1

Maximum length: 1024

employee_number

No

String

Employee ID

Minimum length: 1

Maximum length: 1024

manager

No

Object

Manager

organization

No

String

Organization

Minimum length: 1

Maximum length: 1024

Table 9 manager

Parameter

Mandatory

Type

Description

value

No

String

Manager

Minimum length: 1

Maximum length: 1024

Response Parameters

Status code: 201

Table 10 Parameters in the response body

Parameter

Type

Description

identity_store_id

String

Globally unique ID of the identity source

Minimum length: 1

Maximum length: 36

user_id

String

Globally unique ID of an IAM Identity Center user in the identity source

Minimum length: 1

Maximum length: 47

password

String

One-time password used to initialize the password

Status code: 400

Table 11 Parameters in the response body

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

request_id

String

Request ID

encoded_authorization_message

String

Authentication information

Status code: 403

Table 12 Parameters in the response body

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

request_id

String

Request ID

encoded_authorization_message

String

Authentication information

Status code: 409

Table 13 Parameters in the response body

Parameter

Type

Description

error_code

String

Error code

error_msg

String

Error message

request_id

String

Request ID

encoded_authorization_message

String

Authentication information

Example Request

Creating an IAM Identity Center user in the specified identity source

POST https://{hostname}/v1/identity-stores/{identity_store_id}/users

{
  "user_name" : "User name u1",
  "display_name" : "User display name",
  "emails" : [ {
    "primary" : true,
    "type" : "Work",
    "value" : "email@example.com"
  } ],
  "name" : {
    "family_name" : "Family name",
    "given_name" : "Given name"
  },
  "password_mode" : "OTP"
}

Example Response

Status code: 201

Successful

{
  "identity_store_id" : "d-a00aaaa33f",
  "user_id" : "ac6aa714-daa7-1aaa-aaa2-6715aaaa4dd9",
  "password" : "one-time-password-123"
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.