Add a default stream
This endpoint is only available to organization administrators.
POST https://crdt.zulipchat.com/api/v1/default_streams
Add a stream to the set of default streams
for new users joining the organization.
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")
# Add a stream to the set of default streams for new users.
stream_id = 7
result = client.add_default_stream(stream_id)
print(result)
curl -sSX POST https://crdt.zulipchat.com/api/v1/default_streams \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode stream_id=7
Parameters
stream_id integer required
Example: 7
The ID of the target stream.
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"
}
A typical failed JSON response for when an invalid stream ID is passed:
{
"code": "BAD_REQUEST",
"msg": "Invalid stream ID",
"result": "error"
}
A typical failed JSON response for when a user tries to add a private stream
to the default streams set:
{
"code": "BAD_REQUEST",
"msg": "Private streams cannot be made default.",
"result": "error"
}