Update User Information


Update the information of a user.

Request Format


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

Request Parameters (URI)


Name

Location (Path/Query)

Required/Optional

Data Type

Description

orgId

Query

Required

String

OU ID. How to get orgId >>

userId

Query

Optional

String

User ID. Cannot be empty together with userName. How to get userId >>

userName

Query

Optional

String

Username. Cannot be empty together with userId.

Request Parameters (Body)


Name

Required/Optional

Data Type

Description

phone

Optional

String

The phone number of the user.

nickName

Optional

String

The nickname of the user.

phoneArea

Optional

String

The area code of user phone number.

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.

email

Optional

String

The user’s email address. If the target user is a domain account, and the account in the domain is uniquely identified by an email address, this item cannot be modified and specifying this parameter is invalid.

Response Parameters


Name

Data Type

Description

nickName

String

The nickname of the user.

description

String

The description of the user.

isInitPassword

Boolean

Whether the user password is the initial password. true means it is the initial password, false means it is not the initial password.

phone

String

The phone number of the user.

domain

String

The domain of the user.

name

String

User name.

phoneArea

String

The area code of user phone number.

createdTime

String

The time when the account was created.

theme

String

System theme.

id

String

User ID.

company

String

The company that the user works for.

department

String

The department that the user belongs to.

position

String

The position of the user.

email

String

The user’s email address.

updatedTime

String

The update time of the user information.

Error Codes


Codes

Description

31400

Possible reasons:

  • OU ID is required.

  • At least one of userId and userName is required.

  • Email already exists.

  • Phone number, email, or area code is invalid.

31404

  • OU ID, user ID, or user name does note exist.

  • User is not in the OU.

Samples

Request Sample


url: https://{apigw-address}/app-portal-service/v2.2/user/info/update?userName=your_user_name&orgId=your_org_id

method: POST

requestBody:
{
  "phone": "your_phone_number",
  "nickName": "",
  "phoneArea": "+86",
  "company": "company",
  "position": "position",
  "department": "department",
  "email": "your_user_email"
}

Request Sample


{
    "code": 0,
    "data": {
        "nickName": "",
        "description": "",
        "isInitPassword": false,
        "phone": "your_phone_number",
        "domain": "",
        "name": "your_name",
        "phoneArea": "+86",
        "createdTime": "2021-10-09 03:36:53.0",
        "theme": "DARK",
        "company": "company",
        "id": "your_user_id",
        "position": "position",
        "department": "department",
        "email": "your_user_email"
    },
    "message": "OK"
}