Update stream

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

PATCH https://oscafrica.zulipchat.com/api/v1/streams/{stream_id}

Usage examples

#!/usr/bin/env python3

import zulip

# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")

# Update the stream by a given ID
request = {
    'stream_id': stream_id,
    'stream_post_policy': 2,
    'is_private': True,

result = client.update_stream(request)

curl -sSX PATCH https://oscafrica.zulipchat.com/api/v1/streams/42 \
    -d 'description="This stream is related to football dicsussions."' \
    -d 'new_name="Italy"' \
    -d 'is_private=true'


Argument Example Required Description
stream_id 42 Yes

The ID of the stream to be updated.

description "This stream is related to football dicsussions." No

The new description for the stream.

new_name "Italy" No

The new name for the stream.

is_private true No

The new state of the stream.

is_announcement_only true No

The new state for the announcements.

stream_post_policy 2 No

Indicates which users can post messages to the stream.

history_public_to_subscribers true No

The new state for the history_public_to_subscribers.


Return values

  • stream_id: The ID of the stream to be updated.

Example response

A typical successful JSON response may look like:

    "msg": "",
    "result": "success"

An example JSON response for when the supplied stream does not exist:

    "code": "BAD_REQUEST",
    "msg": "Invalid stream id",
    "result": "error"