Create User with Password¶
Create a user with default password, and add the user to an OU.
Request Parameters (Query)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
orgId | Mandatory | String | OU ID. |
Request Parameters (Body)¶
Name | Mandatory/Optional | Data Type | Description |
---|---|---|---|
name | Mandatory | String | User name. |
Mandatory | String | User email. | |
password | Optional | String | User password. If specified, the password is the default password of the user. If not specified, the interface returns a token to reset user password. |
domain | Optional | String | The domain that the user belongs to. If specified, the user account is a domain account. If not specified, the user account is a non-domain account. |
nickName | Optional | String | The nickname of the user. |
company | Optional | String | The company that the user works for. |
department | Optional | String | The department that the user belongs to. |
position | Optional | String | The position of the user. |
Response Parameter¶
Name | Data Type | Description |
---|---|---|
data | Data Struct | The information of the created user. |
Data Struct¶
Name | Data Type | Description |
---|---|---|
userId | String | User ID. |
token | String | The Token to reset the user password. |
success | Boolean | The result of creating the user, true for success, and false for failure. |
Error Codes¶
Error Code | Description |
---|---|
31400 | Required parameters are missing, or the password does not match the OU password rules. |
31403 | The application does not have the permission to create or delete user accounts. |
31404 | The domain does not exist, or the OU does not acquire the application. |
31408 | The user name or email already exists. |
31429 | The time of resetting passwords reaches the limit. |