Mark all messages as read

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

POST https://cupid-zulip.lngs.infn.it/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://cupid-zulip.lngs.infn.it/api/v1/mark_all_as_read \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY

Arguments

This endpoint does not consume any arguments.

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://cupid-zulip.lngs.infn.it/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://cupid-zulip.lngs.infn.it/api/v1/mark_stream_as_read \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    -d 'stream_id=42'

Arguments

Argument Example Required Description
stream_id 42 Yes

The ID of the stream whose messages should be marked as read.

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://cupid-zulip.lngs.infn.it/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://cupid-zulip.lngs.infn.it/api/v1/mark_topic_as_read \
    -u BOT_EMAIL_ADDRESS:BOT_API_KEY \
    -d 'stream_id=42' \
    -d 'topic_name=new coffee machine'

Arguments

Argument Example Required Description
stream_id 42 Yes

The ID of the stream that contains the topic.

topic_name "new coffee machine" Yes

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