Skip to main content

Updates user information

PATCH/v2/users/:id_or_email

Updates user information based on the user ID or email address. Read-only fields and immutable fields are not modified.

Request​

Path parameters

    id_or_email stringrequired
    • id:
    • email:

Body parameters

    name string

    User name (person name).

    nickname string

    User nickname (or alias).

    defaultSendEmail string

    Default send email address (Optional field: returned when the $select=defaultSendEmail query parameter is added to the URL. Use commas to separate multiple fields.)

    employeeNo string

    Employee ID.

    jobTitle string

    Position.

    workLocation string

    Workplace.

    officeLocation string

    Workstation.

    homeLocation string

    Residence (Optional field: returned after adding the $select=homeLocation query parameter in the URL. Use commas to separate multiple fields).

    departmentIds string[]

    List of departments the user belongs to, not the department chain. A user may belong to multiple departments simultaneously.

    phone string

    Phone number (Optional field: returned when the $select=phone query parameter is added to the URL. Use commas to separate multiple fields.)

    workPhone string

    Work phone number. (Optional field: returned when you add the $select=workPhone query parameter to the URL. To query multiple fields, separate them with commas.)

    status enum

    Account status (Normal or Frozen only). Only the domain administrator or an authorized application can modify it.

    • NORMAL: Normal
    • FREEZE: Frozen

    Possible values: [NORMAL, FREEZE]

    preferredLanguage string

    Language preference (ISO 639-1 Code, e.g., zh_CN/zh_TW/en_US) (Optional field: returned by adding the $select=preferredLanguage query parameter in the URL; use commas to separate multiple fields).

    statusChangeReason string

    Account status change reason. Only modifiable by the domain administrator or an authorized application. (Optional field: Returned by adding the $select=statusChangeReason query parameter in the URL. For multiple fields, use commas to separate.)

    customName string

    Custom display name, the name displayed when sending emails.

    managerEmail string

    Manager email, writable (Optional field: returned when the $select=managerEmail query parameter is added to the URL. Use commas to separate multiple fields).

    lastPasswordChangeTime string<date-time>

    Last password modification time (Optional field: returned when the $select=lastPasswordChangeTime query parameter is added to the URL. Use commas to separate multiple fields.).

    isHidden boolean

    Whether to hide from the address book. Only the administrator or authorized applications can access it and modify it. (Optional field: return by adding the $select=isHidden query parameter in the URL. Use commas to separate multiple fields.)

    info string

    Information notes. Only the domain administrator or authorized applications can access and modify this field. (Optional field: Returns after adding the $select=info query parameter to the URL. Use commas to separate multiple fields.)

    forceChangePasswordNextSignIn boolean

    Whether to force password change on next login. Only administrators or authorized applications can modify it. (Optional field: returned after adding the $select=forceChangePasswordNextSignIn query parameter in the URL. Use commas to separate multiple fields.)

    employeeType enum

    Account type. (Optional field: returned when the $select=employeeType query parameter is added to the URL. For multiple fields, separate them with commas.)

    • EMPLOYEE: Employee
    • CONTRACTOR: Contractor
    • INTERN: Intern
    • SERVICE: Shared account
    • WORK_ACCOUNT: Work account

    Possible values: [EMPLOYEE, CONTRACTOR, INTERN, SERVICE, WORK_ACCOUNT]

    passwordExpireTime string<date-time>

    Password expiration time. (Optional field: returned when the query parameter $select=passwordExpireTime is added to the URL. Separate multiple fields with commas.)

    orderInDepartments object[]

    Sort order of the account in different departments. The full set of department sort values must be provided. This field affects the account's sort order in other departments; in general, prefer using the API that sets the sort order for a single department. For example, if an account belongs to departments a, b, and c, and originally only had a sort value for department c, updating this field with sort values for departments a and b will result in the account having only sort values for departments a and b, and the original sort value for department c will be lost. Only accessible to administrators or authorized applications. This field is modifiable (Optional field: returned when the query parameter $select=orderInDepartments is added to the URL; use commas to separate multiple fields).

    departmentId string
    order string
    customFields object

    Custom field values added by the user. Supports partial modification; you do not need to pass all field values. Can only be modified by the user, an administrator, or an authorized application. Can be read in full via $select=customFields. Otherwise, only the value of a public field can be read via $select=customFields.<fieldID>.

    property name* string

    Custom field values added by the user. Supports partial modification; you do not need to pass all field values. Can only be modified by the user, an administrator, or an authorized application. Can be read in full via $select=customFields. Otherwise, only the value of a public field can be read via $select=customFields.<fieldID>.

Response

No response fieldsA successful response contains no documented fields.

Errors

400Bad Request
401

Access is unauthorized. Please check whether the correct authorization token is passed.

403

No API access permission. Please complete the relevant authorization on the application management page of the domain administrator.

404Not Found