2018-08-11 13:38:55 +02:00
|
|
|
# Mark all messages as read
|
|
|
|
|
|
|
|
Marks all of the current user's unread messages as read.
|
|
|
|
|
|
|
|
`POST {{ api_url }}/v1/mark_all_as_read`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{generate_code_example(python)|/mark_all_as_read:post|example}
|
|
|
|
|
|
|
|
{tab|curl}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2019-05-16 22:38:53 +02:00
|
|
|
``` curl
|
2018-08-11 13:38:55 +02:00
|
|
|
curl -X POST {{ api_url }}/v1/mark_all_as_read \
|
|
|
|
-u BOT_EMAIL_ADDRESS:BOT_API_KEY
|
|
|
|
```
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{end_tabs}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/mark_all_as_read:post}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/mark_all_as_read:post|fixture(200)}
|
|
|
|
|
|
|
|
|
|
|
|
# Mark messages in a stream as read
|
|
|
|
|
|
|
|
Mark all the unread messages in a stream as read.
|
|
|
|
|
|
|
|
`POST {{ api_url }}/v1/mark_stream_as_read`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
|
|
|
|
|
|
|
{generate_code_example(python)|/mark_stream_as_read:post|example}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{tab|curl}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2019-05-16 22:38:53 +02:00
|
|
|
``` curl
|
2018-08-11 13:38:55 +02:00
|
|
|
curl -X POST {{ api_url }}/v1/mark_stream_as_read \
|
|
|
|
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
|
|
|
|
-d "stream_id=42"
|
|
|
|
```
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{end_tabs}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/mark_stream_as_read:post}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/mark_stream_as_read:post|fixture(200)}
|
|
|
|
|
|
|
|
|
|
|
|
# Mark messages in a topic as read
|
|
|
|
|
|
|
|
Mark all the unread messages in a topic as read.
|
|
|
|
|
|
|
|
`POST {{ api_url }}/v1/mark_topic_as_read`
|
|
|
|
|
|
|
|
## Usage examples
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{start_tabs}
|
|
|
|
{tab|python}
|
|
|
|
|
|
|
|
{generate_code_example(python)|/mark_topic_as_read:post|example}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{tab|curl}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
2019-05-16 22:38:53 +02:00
|
|
|
``` curl
|
2018-08-11 13:38:55 +02:00
|
|
|
curl -X POST {{ api_url }}/v1/mark_topic_as_read \
|
|
|
|
-u BOT_EMAIL_ADDRESS:BOT_API_KEY \
|
|
|
|
-d "stream_id=42" \
|
|
|
|
-d "topic_name=new coffee machine"
|
|
|
|
```
|
|
|
|
|
2018-10-18 00:14:30 +02:00
|
|
|
{end_tabs}
|
2018-08-11 13:38:55 +02:00
|
|
|
|
|
|
|
## Arguments
|
|
|
|
|
|
|
|
{generate_api_arguments_table|zulip.yaml|/mark_topic_as_read:post}
|
|
|
|
|
|
|
|
## Response
|
|
|
|
|
|
|
|
#### Example response
|
|
|
|
|
|
|
|
A typical successful JSON response may look like:
|
|
|
|
|
|
|
|
{generate_code_example|/mark_topic_as_read:post|fixture(200)}
|