Create User and Choose OU


Create users and assign to an OU.

Operation Permissions


You need to authorize the application with the “Create or delete user accounts in this OU” permission in Application Portal.

Request Format


POST https://{apigw-address}/app-portal-service/v2.3/user/createAndJoinOrg

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.
domain Mandatory String The account domain name that is registered in Application Portal. - To create a domain account, specify a domain. - To create a non-domain account, leave the parameter blank.
email Mandatory String User email
organizationId Mandatory String The ID of OU to assign the user How to get organizationId >>.
locale Optional String

Language code. If unspecified, it is set to Chinese by default.

  • en_US for English
  • zh_CN for Chinese
  • es_ES for Spanish
  • ja_JP for Japanese
  • de_DE for German
  • pl_PL for Polish
nickName Optional String User nickname.

Response Parameters


Name Data Type Description
userId String New User ID.

Error Codes


Code Description
31400 Possible causes: OU ID, user name, and email are required, or the application is invalid.
31403 The application does not have the permission of “Create or delete user accounts in this OU”.
31404 OU or domain does not exist.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.3/user/createAndJoinOrg?orgId=your_org_id

method: POST

requestBody:
{
  "organizationId": "your_structure_id",
  "nickName": "your_nickname",
  "domain": "your_domain",
  "name": "your_user_name",
  "locale": "en_US",
  "email": "your_email"
}

Return Sample


{
    "code": 0,
    "message": "OK",
    "data": {
        "userId": "your_user_id"
    }
}