Mark all messages as read

Marks all of the current user's unread messages as read.

POST https://zulip.demo.lnf.aquaray.com/api/v1/mark_all_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 all of the user's unread messages as read
result = client.mark_all_as_read()
print(result)

curl -sSX POST https://zulip.demo.lnf.aquaray.com/api/v1/mark_all_as_read \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Parameters

This endpoint does not accept any parameters.

Response

Example response

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

Mark messages in a stream as read

Mark all the unread messages in a stream as read.

POST https://zulip.demo.lnf.aquaray.com/api/v1/mark_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://zulip.demo.lnf.aquaray.com/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

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}

Mark messages in a topic as read

Mark all the unread messages in a topic as read.

POST https://zulip.demo.lnf.aquaray.com/api/v1/mark_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://zulip.demo.lnf.aquaray.com/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

A typical successful JSON response may look like:

{
    "msg": "",
    "result": "success"
}