Mark all messages as read
POST https://oop.zulip.cs.ut.ee/api/v1/mark_all_as_read
Marks all of the current user's unread messages as read.
Changes: Before Zulip 6.0 (feature level 153), this
request did a single atomic operation, which could time out
with 10,000s of unread messages to mark as read.
It now marks messages as read in batches, starting with the
newest messages, so that progress will be made even if the
request times out.
If the server's processing is interrupted by a timeout, it
will return an HTTP 200 success response with result
"partially_completed". A correct client should repeat the
request when handling such a response.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Mark all of the user's unread messages as read
result = client.mark_all_as_read()
print(result)
curl -sSX POST https://oop.zulip.cs.ut.ee/api/v1/mark_all_as_read \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY
Parameters
This endpoint does not accept any parameters.
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"
}
If the request exceeds its processing time limit after having
successfully marked some messages as read, response code 200
with result "partially_completed" and code "REQUEST_TIMEOUT" will be returned like this:
{
"code": "REQUEST_TIMEOUT",
"msg": "",
"result": "partially_completed"
}
Mark messages in a stream as read
POST https://oop.zulip.cs.ut.ee/api/v1/mark_stream_as_read
Mark all the unread messages in a stream as read.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Mark the unread messages in stream with ID "1" as read
result = client.mark_stream_as_read(1)
print(result)
curl -sSX POST https://oop.zulip.cs.ut.ee/api/v1/mark_stream_as_read \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode stream_id=43
Parameters
stream_id integer required
Example: 43
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"
}
Mark messages in a topic as read
POST https://oop.zulip.cs.ut.ee/api/v1/mark_topic_as_read
Mark all the unread messages in a topic as read.
Usage examples
#!/usr/bin/env python3
import zulip
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Mark the unread messages in stream 1's topic "topic_name" as read
result = client.mark_topic_as_read(1, topic_name)
print(result)
curl -sSX POST https://oop.zulip.cs.ut.ee/api/v1/mark_topic_as_read \
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
--data-urlencode stream_id=43 \
--data-urlencode 'topic_name=new coffee machine'
Parameters
stream_id integer required
Example: 43
The ID of the stream to access.
topic_name string required
Example: "new coffee machine"
The name of the topic whose messages should be marked as read.
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"
}