DELETE /users/me/subscriptions

Unsubscribe yourself or other users from one or more channels.

In addition to managing the current user's subscriptions, this endpoint can be used to remove other users from channels. This is possible in 3 situations:

Changes: Before Zulip 10.0 (feature level 362), subscriptions in archived channels could not be modified.

Before Zulip 8.0 (feature level 208), if a user specified by the principals parameter was a deactivated user, or did not exist, then an HTTP status code of 403 was returned with code: "UNAUTHORIZED_PRINCIPAL" in the error response. As of this feature level, an HTTP status code of 400 is returned with code: "BAD_REQUEST" in the error response for these cases.

Before Zulip 8.0 (feature level 197), the can_remove_subscribers_group setting was named can_remove_subscribers_group_id.

Before Zulip 7.0 (feature level 161), the can_remove_subscribers_group_id for all channels was always the system group for organization administrators.

Before Zulip 6.0 (feature level 145), users had no special privileges for managing bots that they own.

Servers

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
principals No

A list of user IDs (preferred) or Zulip API email addresses of the users to be subscribed to or unsubscribed from the channels specified in the subscriptions parameter.

If not provided, then the requesting user/bot will be subscribed/unsubscribed from the specified channels.

Changes: Before Zulip 3.0 (feature level 9), only the Zulip API email address string format was supported.

subscriptions[] Array Yes

A list of channel names to unsubscribe from. This parameter is called streams in our Python API.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. 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.
  3. Click Test request to test run your request to the API and see the API's response.