Wechat Work Node icon

Wechat Work Node

Wechat Work Node

用户管理 → 更新成员

AI-generated

Summary

Update an existing enterprise WeChat user's information by specifying their unique UserID and optional updated attributes such as name, alias, mobile phone, departments, position, gender, email, avatar, address, status, and additional custom JSON fields.

Inputs

  • userid (required) — The unique UserID of the member within the enterprise, matching the management console account. This identifies which user to update.
  • name — The member's new name, up to 64 UTF-8 characters.
  • alias — The member's new alias, 1 to 64 UTF-8 characters.
  • mobile — Member's mobile phone number, unique within the enterprise. Either mobile or email must be provided.
  • department — List of departments the member belongs to, each with department ID, order, and leader flag. Maximum 100 entries. If empty or contains ID 0, member is placed in 'other' department; unknown departments will be auto-created.
  • position — Member's job title.
  • gender — Member's gender: '1' for male, '2' for female.
  • email — Member's email address.
  • biz_mail — Member's enterprise email address.
  • telephone — Member's landline phone number.
  • direct_leader — A list of the member's direct leaders within the enterprise (up to one).
  • avatar_mediaid — Media ID of the member's avatar image, obtained via media upload.
  • address — Member's address.
  • main_department — Boolean indicating if the member's main department is as specified in the department list.
  • enable — Enable or disable the member's account.
  • to_invite — Whether to invite the member to use WeChat Work.
  • json — Additional JSON-encoded attributes for extended profile information, e.g., external_profile, external_position.

Output shape

a single JSON object representing the API response indicating success or failure of the update operation

The operation returns the raw response JSON from the WeChat Work API indicating error codes and messages. No pagination or multi-item results occur.

Examples

Example 1: Update user information including name, mobile, and departments

Provide userid, name, mobile, and department list parameters to update user details.

Links

Discussion