Archive a stream

This endpoint is only available to organization administrators.

DELETE https://css2024.zulip.aalto.fi/api/v1/streams/{stream_id}

Archive the stream with the ID stream_id.

Usage examples

#!/usr/bin/env python

import zulip

# The user for this zuliprc file must be an organization administrator
client = zulip.Client(config_file="~/zuliprc-admin")

# Archive the stream named 'stream to be archived'
stream_id = client.get_stream_id("stream to be archived")["stream_id"]
result = client.delete_stream(stream_id)
print(result)

curl -sSX DELETE https://css2024.zulip.aalto.fi/api/v1/streams/1 \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

stream_id integer required in path

Example: 1

The ID of the stream to access.


Response

Example response(s)

Changes: As of Zulip 7.0 (feature level 167), if any parameters sent in the request are not supported by this endpoint, a successful JSON response will include an ignored_parameters_unsupported array.

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"
}