2018-07-10 08:17:35 +02:00
|
|
|
# Topic muting
|
|
|
|
|
|
|
|
This endpoint mutes/unmutes a topic within a stream that the current
|
|
|
|
user is subscribed to. Muted topics are displayed faded in the Zulip
|
|
|
|
UI, and are not included in the user's unread count totals.
|
|
|
|
|
|
|
|
`PATCH {{ api_url }}/v1/users/me/subscriptions/muted_topics`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-07-10 08:17:35 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{generate_code_example(python)|/users/me/subscriptions/muted_topics:patch|example}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-07-10 08:17:35 +02:00
|
|
|
|
2019-10-11 14:19:38 +02:00
|
|
|
{generate_code_example(curl, exclude=["stream_id"])|/users/me/subscriptions/muted_topics:patch|example}
|
2018-07-10 08:17:35 +02:00
|
|
|
|
2018-09-17 16:27:32 +02:00
|
|
|
{end_tabs}
|
2018-07-10 08:17:35 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/users/me/subscriptions/muted_topics:patch}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/users/me/subscriptions/muted_topics:patch|fixture(200)}
|
|
|
|
|
|
|
|
|
|
|
|
An example JSON response for when an `add` operation is requested for a topic
|
|
|
|
that has already been muted:
|
|
|
|
|
|
|
|
{generate_code_example|/users/me/subscriptions/muted_topics:patch|fixture(400_topic_already_muted)}
|
|
|
|
|
|
|
|
An example JSON response for when a `remove` operation is requested for a
|
|
|
|
topic that had not been previously muted:
|
|
|
|
|
|
|
|
{generate_code_example|/users/me/subscriptions/muted_topics:patch|fixture(400_topic_not_muted)}
|