联系客服 新闻资讯 所有频道 使用说明 芯片选型

Deactivate a user

This endpoint is only available to organization administrators.

Deactivates a user given their user ID.

DELETE https://we.comake.online/api/v1/users/{user_id}

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Deactivate a user
user_id = 8
result = client.deactivate_user_by_id(user_id)
print(result)

curl -sSX DELETE https://we.comake.online/api/v1/users/12 \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

user_id integer required in path

Example: 12

The target user's ID.


Response

Example response

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:

{
    "msg": "Cannot deactivate the only organization owner",
    "result": "error"
}