Deactivate own user

Deactivates the user's account. See also the administrative endpoint for deactivating another user.

DELETE https://team.webramz.com/api/v1/users/me

This endpoint is primarily useful to Zulip clients providing a user settings UI.

Usage examples

#!/usr/bin/env python3

import zulip

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

# Deactivate the account of the current user/bot that requests.
result = client.call_endpoint(
    url="/users/me",
    method="DELETE",
)
print(result)

curl -sSX DELETE https://team.webramz.com/api/v1/users/me \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

This endpoint does not accept any parameters.

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"
}