zulip/templates/zerver/api/mute-user.md

733 B

Mute a user

{generate_api_description(/users/me/muted_users/{muted_user_id}:post)}

Usage examples

{start_tabs} {tab|python}

{generate_code_example(python)|/users/me/muted_users/{muted_user_id}:post|example}

{tab|curl}

{generate_code_example(curl)|/users/me/muted_users/{muted_user_id}:post|example}

{end_tabs}

Parameters

{generate_api_arguments_table|zulip.yaml|/users/me/muted_users/{muted_user_id}:post}

Response

Example response

A typical successful JSON response may look like:

{generate_code_example|/users/me/muted_users/{muted_user_id}:post|fixture(200)}

An example JSON response for when a user is already muted:

{generate_code_example|/users/me/muted_users/{muted_user_id}:post|fixture(400)}