PATCH /streams/{stream_id}

Configure the channel with the ID stream_id. This endpoint supports an organization administrator editing any property of a channel, including:

Note that an organization administrator's ability to change a private channel's permissions depends on them being subscribed to the channel.

Changes: Before Zulip 10.0 (feature level 362), channel privacy could not be edited for archived channels.

Removed stream_post_policy and is_announcement_only parameters in Zulip 10.0 (feature level 333), as permission to post in the channel is now controlled by can_send_message_group.

Servers

Path parameters

Name Type Required Description
stream_id Integer Yes

The ID of the channel to access.

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
folder_id Integer No

ID of the new channel folder to which the channel should belong.

A null value indicates the user wants to remove the channel from its current channel folder.

Changes: New in Zulip 11.0 (feature level 389).

is_web_public Boolean No

Change whether the channel is a web-public channel.

Note that creating web-public channels requires the WEB_PUBLIC_STREAMS_ENABLED server setting to be enabled on the Zulip server in question, the organization to have enabled the enable_spectator_access realm setting, and the current use to have permission under the organization's can_create_web_public_channel_group realm setting.

Changes: New in Zulip 5.0 (feature level 98).

description String No

The new description for the channel, in Zulip-flavored Markdown format.

Clients should use the max_stream_description_length returned by the POST /register endpoint to determine the maximum channel description length.

Changes: Removed unnecessary JSON-encoding of this parameter in Zulip 4.0 (feature level 64).

is_default_stream Boolean No

Add or remove the channel as a default channel for new users joining the organization.

Changes: New in Zulip 8.0 (feature level 200). Previously, default channel status could only be changed using the dedicated API endpoint.

message_retention_days No

Number of days that messages sent to this channel will be stored before being automatically deleted by the message retention policy. Two special string format values are supported:

  • "realm_default": Return to the organization-level setting.
  • "unlimited": Retain messages forever.

Changes: Prior to Zulip 5.0 (feature level 91), retaining messages forever was encoded using "forever" instead of "unlimited".

New in Zulip 3.0 (feature level 17).

new_name String No

The new name for the channel.

Clients should use the max_stream_name_length returned by the POST /register endpoint to determine the maximum channel name length.

Changes: Removed unnecessary JSON-encoding of this parameter in Zulip 4.0 (feature level 64).

history_public_to_subscribers Boolean No

Whether the channel's message history should be available to newly subscribed members, or users can only access messages they actually received while subscribed to the channel.

Corresponds to the shared history option for private channels.

It's an error for this parameter to be false for a public or web-public channel and when is_private is false.

This can only be false if can_create_topic_group for the channel is the role:everyone system group.

Changes: Before Zulip 6.0 (feature level 136), history_public_to_subscribers was silently ignored unless the request also contained either is_private or is_web_public.

topics_policy String No

Whether named topics and the empty topic (i.e., "general chat" topic) are enabled in this channel.

  • "inherit": Messages can be sent to named topics in this channel, and the organization-level realm_topics_policy is used for whether messages can be sent to the empty topic in this channel.
  • "allow_empty_topic": Messages can be sent to both named topics and the empty topic in this channel.
  • "disable_empty_topic": Messages can be sent to named topics in this channel, but the empty topic is disabled.
  • "empty_topic_only": Messages can be sent to the empty topic in this channel, but named topics are disabled. See "general chat" channels.

The "empty_topic_only" policy can only be set if all existing messages in the channel are already in the empty topic.

When creating a new channel, if the topics_policy is not specified, the "inherit" option will be set.

Changes: In Zulip 11.0 (feature level 404), the "empty_topic_only" option was added.

New in Zulip 11.0 (feature level 392).

Valid values:

  • "empty_topic_only"
  • "inherit"
  • "allow_empty_topic"
  • "disable_empty_topic"
is_private Boolean No

Change whether the channel is a private channel.

is_archived Boolean No

A boolean indicating whether the channel is archived or unarchived. Currently only allows unarchiving previously archived channels.

Changes: New in Zulip 11.0 (feature level 388).

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.