Customer Identity (CIAM)

Add User

# Request Description

POST https://{your_domain}/api/v2/tenant/users

# Request Headers

Parameter Name Chinese Name Required Type Description
Authorization Authorization Yes String Format: Bearer {access_token}
Content-Type Content Type Yes String Fixed value: application/json; charset=utf-8

# Request Example

{
  	"user_name":"zhangsan",
	"name":"张三",
	"mobile":"+86-15200000000",
	"email":"15200000000@qq.com",
	"pwd":"qwe123!@#",
	"pwd_must_modify":false,
	"attr_gender":"male",
	"attr_birthday":"2022-02-17",
	"attr_nick_name":"张三",
	"mailing_address":"湖北省武汉市",
	"zip_code":"430000",
	"first_name":"",
	"middle_name":"",
	"last_name":"",
	"industry":"事业单位",
	"external_id":"12345678741d29069abcdef089d4q87sk12",
    "head_img": "data:image/jpeg;base64,.......",
	"extension": {
	    "age":"28"
	  }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

# Request Parameters

Parameter Name Chinese Name Required Type Description
user_name Username No String Username, the user's unique identifier within the enterprise. It can be specified in the request parameters. If not provided, the system will automatically generate one.
name Name No String
mobile Mobile Number No String Mobile number supports international area code, format: Area Code-Mobile Number
email Email No String
pwd Password No String The password must meet the format defined by the enterprise.
pwd_must_modify Force Password Change No Boolean Whether the password must be changed upon next successful login. Default value is true.
attr_gender Gender No String Optional values: "unknow": Undisclosed "male": Male "female": Female
attr_birthday Birthday No String Format: yyyy-mm-dd
attr_nick_name Nickname No String
mailing_address Mailing Address No String
zip_code Postal Code No String
first_name First Name No String
middle_name Middle Name No String
last_name Last Name No String
industry Industry No String
external_id External System ID No String Third-party user ID
head_img User Avatar No String User avatar, supports base64 encoded image strings and URLs starting with http or https
extension Extension Attributes No JSONObject Extension attributes, which need to be defined within the enterprise.

Note: Enterprises can modify whether system-built attributes are required and their display names (system attributes cannot be deleted) in "Enterprise Center - User Attribute Definition" according to actual needs. They can also extend user attributes based on enterprise requirements. Interface request parameters are processed according to the attributes defined in the "User Attribute Definition" module. The format for custom date attributes is yyyy-mm-dd.

# Response Example

Success Example:
HTTP/1.1 200 OK
Content-Type: application/json
{
  "user_id": "20201028102749564-9082-DC8CD2722"
}


Error Example:
HTTP/1.1 400 Bad Request
{
  "error_msg": "User not found",
  "error_code": "IDAAS.TENANT.USER.0001"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14

# Response Parameters

Parameter Name Chinese Name Type Description
user_id Created User user_id String Automatically generated by the IDaaS platform

# Error Codes

Status Code Error Code Error Message Handling Action
400 IDAAS.TENANT.USER.0001 User not found Please check if the corresponding user exists
用户未找到
400 IDAAS.TENANT.USER.0002 Username cannot be empty Please check if the username field in the input parameters is empty
用户名不能为空
400 IDAAS.TENANT.USER.0003 Name cannot be empty Please check if the name field in the input parameters is empty
姓名不能为空
400 IDAAS.TENANT.USER.0004 Mobile number cannot be empty Please check if the mobile number field in the input parameters is empty
手机号不能为空
400 IDAAS.TENANT.USER.0005 E-mail cannot be empty Please check if the email field in the input parameters is empty
邮箱不能为空
400 IDAAS.TENANT.USER.0006 Password cannot be empty Please check if the password field in the input parameters is empty
密码不能为空
400 IDAAS.TENANT.USER.0007 Gender cannot be empty Please check if the gender field in the input parameters is empty
性别不能为空
400 IDAAS.TENANT.USER.0008 Birthday cannot be empty Please check if the birthday field in the input parameters is empty
生日不能为空
400 IDAAS.TENANT.USER.0009 Nick name cannot be empty Please check if the nickname field in the input parameters is empty
昵称不能为空
400 IDAAS.TENANT.USER.0010 Mailing address cannot be empty Please check if the mailing address field in the input parameters is empty
邮寄地址不能为空
400 IDAAS.TENANT.USER.0011 Zip code cannot be empty Please check if the zip code field in the input parameters is empty
邮政编码不能为空
400 IDAAS.TENANT.USER.0012 First name cannot be empty Please check if the first name field in the input parameters is empty
名字不能为空
400 IDAAS.TENANT.USER.0013 Middle name cannot be empty Please check if the middle name field in the input parameters is empty
中间名不能为空
400 IDAAS.TENANT.USER.0014 Last name cannot be empty Please check if the last name field in the input parameters is empty
姓氏不能为空
400 IDAAS.TENANT.USER.0015 Industry cannot be empty Please check if the industry field in the input parameters is empty
所属行业不能为空
400 IDAAS.TENANT.USER.0016 External ID cannot be empty Please check if the external ID field in the input parameters is empty
外部ID不能为空
400 IDAAS.TENANT.USER.0017 Extended property {0} cannot be empty Please check if the extended property {0} field in the input parameters is empty
扩展属性{0}不能为空
400 IDAAS.TENANT.USER.0018 The username does not meet the verification rules Please check if the username field in the input parameters complies with the validation rules for the username field in 【Enterprise Center - User - User Attribute Definition】
用户名不符合校验规则
400 IDAAS.TENANT.USER.0019 The name does not meet the verification rules Please check if the name field in the input parameters complies with the validation rules for the name field in 【Enterprise Center - User - User Attribute Definition】
姓名不符合校验规则
400 IDAAS.TENANT.USER.0020 The mobile number does not meet the verification rules Please check if the mobile number field in the input parameters complies with the validation rules for the mobile number field in 【Enterprise Center - User - User Attribute Definition】
手机号不符合校验规则
400 IDAAS.TENANT.USER.0021 The e-mail does not meet the verification rules Please check if the email field in the input parameters complies with the validation rules for the email field in 【Enterprise Center - User - User Attribute Definition】
邮箱不符合校验规则
400 IDAAS.TENANT.USER.0023 The gender does not meet the verification rules Please check if the gender field in the input parameters complies with the validation rules for the gender field in 【Enterprise Center - User - User Attribute Definition】
性别不符合校验规则
400 IDAAS.TENANT.USER.0024 The birthday does not meet the verification rules Please check if the birthday field in the input parameters complies with the validation rules for the birthday field in 【Enterprise Center - User - User Attribute Definition】
生日不符合校验规则
400 IDAAS.TENANT.USER.0025 The nickname does not meet the verification rules Please check if the nickname field in the input parameters complies with the validation rules for the nickname field in 【Enterprise Center - User - User Attribute Definition】
昵称不符合校验规则
400 IDAAS.TENANT.USER.0026 The mailing address does not meet the verification rules Please check if the mailing address field in the input parameters complies with the validation rules for the mailing address field in 【Enterprise Center - User - User Attribute Definition】
邮寄地址不符合校验规则
400 IDAAS.TENANT.USER.0027 The zip code does not meet the verification rules Please check if the zip code field in the input parameters complies with the validation rules for the birthday field in 【Enterprise Center - User - User Attribute Definition】
邮政编码不符合校验规则
400 IDAAS.TENANT.USER.0028 The first name does not meet the verification rules Please check if the first name field in the input parameters complies with the validation rules for the first name field in 【Enterprise Center - User - User Attribute Definition】
名字不符合校验规则
400 IDAAS.TENANT.USER.0029 The middle name does not meet the verification rules Please check if the middle name field in the input parameters complies with the validation rules for the middle name field in 【Enterprise Center - User - User Attribute Definition】
中间名不符合校验规则
400 IDAAS.TENANT.USER.0030 The last name does not meet the verification rules Please check if the last name field in the input parameters complies with the validation rules for the last name field in 【Enterprise Center - User - User Attribute Definition】
姓氏不符合校验规则
400 IDAAS.TENANT.USER.0031 The industry does not meet the verification rules Please check if the industry field in the input parameters complies with the validation rules for the industry field in 【Enterprise Center - User - User Attribute Definition】
所属行业不符合校验规则
400 IDAAS.TENANT.USER.0032 The external ID does not meet the verification rules Please check if the external ID field in the input parameters complies with the validation rules for the external ID field in 【Enterprise Center - User - User Attribute Definition】
外部ID不符合校验规则
400 IDAAS.TENANT.USER.0033 The extended attribute {0} does not meet the verification rules Please check if the extended attribute {0} field in the input parameters complies with the validation rules for the extended attribute {0} field in 【Enterprise Center - User - User Attribute Definition】
扩展属性{0}不符合校验规则
400 IDAAS.TENANT.MOBILE.0002 An unauthenticated cell mobile number Please check if 【Enterprise Center - Enterprise Configuration - International Area Code Configuration】 complies with the configuration rules
未经认证的手机号
400 IDAAS.TENANT.USER.0034 Username already exists Please check if the user exists
用户名已存在
400 IDAAS.TENANT.USER.0035 Mobile number already exists Delete the mobile number and add it again, or use a mobile number that has not been added before.
手机号已存在
400 IDAAS.TENANT.USER.0036 E-mail already exists Delete the email and add it again, or use an email that has not been added before.
邮箱已存在
400 IDAAS.TENANT.USER.0037 Extended property {0} already exists Delete the extended property {0} and add it again, or use an extended property {0} that has not been added before.
扩展属性{0}已存在
400 IDAAS.TENANT.PWD.0001 The password is used before, cannot be used again Please re-enter the password
不允许使用历史密码
400 IDAAS.TENANT.PWD.0002 Password cannot username in reverse order Please re-enter the password
密码不允许使用用户名的倒写
400 IDAAS.TENANT.PWD.0003 Password cannot contain :username, mobile number, email prefix, name in PinYing Please re-enter the password
密码中不允许包含:用户名、手机号、邮箱前缀、姓名拼音
400 IDAAS.TENANT.PWD.0004 Your password complexity is low, {0} Please re-enter the password
密码复杂度低,{0}
400 IDAAS.TENANT.PWD.0005 The password is weak Please re-enter the password
该密码为弱密码
400 IDAAS.TENANT.PWD.0006 Number of character repeat in password should not exceed {0} Please re-enter the password
密码中最大字符重复数不能超过{0}
400 IDAAS.TENANT.PWD.0007 The password must contain {0} to {1} characters Please re-enter the password
密码长度为{0}~{1}个字符

I am ready. Please provide the Markdown content to be translated.