#!/usr/bin/env pythonimportzulip# The user for this zuliprc file must be an organization administratorclient=zulip.Client(config_file="~/zuliprc-admin")# Deactivate a useruser_id=8result=client.deactivate_user_by_id(user_id)print(result)
If not null, requests that the deactivated user receive
a notification email about their account deactivation.
If not "", encodes custom text written by the administrator
to be included in the notification email.
Changes: New in Zulip 5.0 (feature level 135).
Response
Example response(s)
Changes: As of Zulip 7.0 (feature level 167), if any
parameters sent in the request are not supported by this
endpoint, a successful JSON response will include an
ignored_parameters_unsupported array.
A typical successful JSON response may look like:
{"msg":"","result":"success"}
An example JSON error response when attempting to deactivate the only
organization owner in an organization:
{"code":"BAD_REQUEST","msg":"Cannot deactivate the only organization owner","result":"error"}