PATCH /users/{user_id}

Administrative endpoint to update the details of another user in the organization.

Supports everything an administrator can do to edit details of another user's account, including editing full name, role, and custom profile fields.

Servers

Path parameters

Name Type Required Description
user_id Integer Yes

The target user's ID.

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/x-www-form-urlencoded"

Request body fields

Name Type Required Description
new_email String No

New email address for the user. Requires the user making the request to be an organization owner and additionally have the .can_change_user_emails special permission.

Changes: New in Zulip 10.0 (feature level 285).

full_name String No

The user's full name.

Changes: Removed unnecessary JSON-encoding of this parameter in Zulip 5.0 (feature level 106).

role Integer No

New role for the user. Roles are encoded as:

  • Organization owner: 100
  • Organization administrator: 200
  • Organization moderator: 300
  • Member: 400
  • Guest: 600

Only organization owners can add or remove the owner role.

The owner role cannot be removed from the only organization owner.

Changes: New in Zulip 3.0 (feature level 8), replacing the previous pair of is_admin and is_guest boolean parameters. Organization moderator role added in Zulip 4.0 (feature level 60).

profile_data[] Array No

An array of objects describing updates to the custom profile field data for the user.

profile_data[].id Integer Yes

The ID of the custom profile field to update.

profile_data[].value Yes

The new value for the user of the specified custom profile field.

If null, then any value already set for the specified custom profile field will be removed.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.