mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
This commit fixes examples in "400" response for deactivating user endpoints to have msg as "Cannot deactivate the last organization owner" instead of "Cannot deactivate the last organization administrator". We had already removed the restriction on deactivating last admin and added it for last owner, while adding owner role.
34 lines
674 B
Markdown
34 lines
674 B
Markdown
# Deactivate a user
|
|
|
|
{generate_api_description(/users/{user_id}:delete)}
|
|
|
|
## Usage examples
|
|
|
|
{start_tabs}
|
|
{tab|python}
|
|
|
|
{generate_code_example(python)|/users/{user_id}:delete|example}
|
|
|
|
{tab|curl}
|
|
|
|
{generate_code_example(curl)|/users/{user_id}:delete|example}
|
|
|
|
{end_tabs}
|
|
|
|
## Parameters
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/users/{user_id}:delete}
|
|
|
|
## Response
|
|
|
|
#### Example response
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
{generate_code_example|/users/{user_id}:delete|fixture(200)}
|
|
|
|
An example JSON error response when attempting to deactivate the only
|
|
organization owner in an organization:
|
|
|
|
{generate_code_example|/users/{user_id}:delete|fixture(400)}
|