Create and Join User


Create a user, specify the user’s company, department, position, and other information, and assign an OU to the user.

Prerequisites


The application has been granted the “Create or delete user accounts in the OU” permission. Contact the OU administrator to get the permission if necessary.

Request Format


POST https://{apigw-address}/app-portal-service/v2.2/user/createAndJoin

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

name

Required

String

The user name.

domain

Optional

String

The domain name that has been registered in Application Portal. If you want to create a domain account, you need to specify a domain. If not, leave it empty to create a non-domain account.

email

Required

String

The user’s email address.

organizationId

Required

String

The ID of the OU to assign to the user. How to get organizationId >>

locale

Optional

String

Specifies the language in which to return the list information. The following values ​​are supported:

  • en_US: English

  • zh_CN: Chinese

  • es_ES: Spanish

  • ja_JP: Japanese

  • de_DE: German

  • pl_PL: Polish

By default, the list information in Chinese zh_CN is returned.

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 Parameters


Name

Data Type

Description

data

Boolean

Whether the user was created successfully. true means the creation was successful, false means the creation failed.

Error Codes


Code

Description

31400

Errors such as incorrect parameters, empty parameters, character limits exceeded, and so on.

31403

The application has not been granted the “Create or delete user accounts in the OU” permission.

31404

Errors such as OU not found, domain not found, and so on.

31408

User’s account or email already existed.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/user/createAndJoin

method: POST

requestBody:
{
  "name": "yourName",
  "domain": "yourDomain",
  "email": "yourEmail",
  "organizationId": "yourOrgId",
  "locale": "zh_CN",
  "nickName": "yourNickname",
  "company": "yourCompany",
  "department": "yourDepartment",
  "position": "yourPosition"
}

Return Sample


{
  "code": 0,
  "message": "OK",
  "data": true
}