Create User and Choose Organization


Create a user and assign to an OU.

Prerequisites


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

Request Format


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

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

OU ID. Need to be consistent with the value specified in organizationId. How to get orgId >>

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

name

Required

String

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 OU to assign the user. Need to be consistent with the value specified in orgId. 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 English en_US is returned.

nickName

Optional

String

User nickname.

Response Parameters


Name

Data Type

Description

userId

String

The created user ID.

Error Codes


Code

Description

31400

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"
    }
}