POST /user_topics
This endpoint is used to update the personal preferences for a topic, such as the topic's visibility policy, which is used to implement mute a topic and related features.
This endpoint can be used to update the visibility policy for the single channel and topic pair indicated by the parameters for a user.
Changes: New in Zulip 7.0 (feature level 170). Previously, toggling whether a topic was muted or unmuted was managed by the PATCH /users/me/subscriptions/muted_topics endpoint.
Servers
- https://{subdomain}.zulipchat.com/api/v1
- {server}/api/v1
- https://chat.zulip.org/api/v1
Request headers
| Name | Type | Required | Description |
|---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/x-www-form-urlencoded" |
Request body fields
| Name | Type | Required | Description |
|---|---|---|---|
stream_id |
Integer | Yes |
The ID of the channel to access. |
topic |
String | Yes |
The topic for which the personal preferences needs to be updated. Note that the request will succeed regardless of whether any messages have been sent to the specified topic. Clients should use the Note: When the value of Changes: Before Zulip 10.0 (feature level 334), empty string was not a valid topic name for channel messages. |
visibility_policy |
Integer | Yes |
Controls which visibility policy to set.
In an unmuted channel, a topic visibility policy of unmuted will have the same effect as the "None" visibility policy. Changes: In Zulip 7.0 (feature level 219), added followed as a visibility policy option. Valid values:
|
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.