# "Mark as read" endpoint for rooms?

**URL:** <https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318>\
**Category:** 💬 Talk (spreed)\
**Tags:** api\
**Created:** [June 1, 2020, 11:10am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318 "2020-06-01T11:10:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jipfr](https://help.nextcloud.com/letter_avatar/jipfr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jipfr](https://help.nextcloud.com/u/jipfr)\
**Post date:** [June 1, 2020, 11:10am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/1 "2020-06-01T11:10:21Z")

</div>

Hey all. I’m building my own custom client for Spreed, but can’t seem to figure out what the endpoint is to mark a room as read?

I’ve found [https://nextcloud-talk.readthedocs.io/en/latest/chat/#mark-chat-as-read](https://nextcloud-talk.readthedocs.io/en/latest/chat/#mark-chat-as-read), however that doesn’t seem current.

Would anyone be able to help me with this?

---

<div class="post-metadata">

**Author:** ![nickvergessen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nickvergessen/32/66965_2.png) [@nickvergessen](https://help.nextcloud.com/u/nickvergessen)\
**Post date:** [June 16, 2020, 12:24pm UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/2 "2020-06-16T12:24:56Z")

</div>

Hi there,

that is still the current endpoint and in case it is not working as expected, feel free to open an issue in the github repository:

> **[nextcloud/spreed](https://github.com/nextcloud/spreed/issues)**
>
> 📞😀 Nextcloud Talk – chat, video & audio calls for Nextcloud - nextcloud/spreed

But to support old clients and not break their behaviour by default we also set the read marker when you poll for new messages.  
So in case you don’t want that but set the read-marker yourself, make sure to add `setReadMarker=0` to the requests you do to fetch messages.

---

<div class="post-metadata">

**Author:** ![jipfr](https://help.nextcloud.com/letter_avatar/jipfr/32/5_5575768a8748004e209b776fc1b2916d.png) [@jipfr](https://help.nextcloud.com/u/jipfr)\
**Post date:** [June 17, 2020, 10:55am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/3 "2020-06-17T10:55:48Z")

</div>

I am sending a POST request to `/ocs/v2.php/apps/spreed/api/v1/chat/rcz2xagq/read`, however, according to the response it’s not a valid query.

I’m getting the following response

```xml
<ocs>
 <meta>
  <status>failure</status>
  <statuscode>404</statuscode>
  <message>Invalid query, please check the syntax. API specifications are here: http://www.freedesktop.org/wiki/Specifications/open-collaboration-services.
</message>
 </meta>
 <data/>
</ocs>

```

What’s interesting is that this endpoint also doesn’t appear to be called from spreed, or any endpoint with “read” in the URL for that matter.

It also doesn’t appear to mark the rooms as read when I fetch the messages from `/ocs/v2.php/apps/spreed/api/v1/chat/MYROOMTOKEN?lookIntoFuture=0&includeLastKnown=1`, although that’s actually fine with me.

Any ideas?

---

<div class="post-metadata">

**Author:** ![nickvergessen](https://help.nextcloud.com/user_avatar/help.nextcloud.com/nickvergessen/32/66965_2.png) [@nickvergessen](https://help.nextcloud.com/u/nickvergessen)\
**Post date:** [June 19, 2020, 8:57am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/4 "2020-06-19T08:57:22Z")

</div>

> [@jipfr](#):
>
> /ocs/v2.php/apps/spreed/api/v1/chat/MYROOMTOKEN?lookIntoFuture=0&includeLastKnown=1

Yeah grabbing the history doesn’t mark as read. Do a request for `lookIntoFuture=1`

> [@jipfr](#):
>
> however, according to the response it’s not a valid query.
> 
> I’m getting the following response

Ups, that’s a shame. Let me look into this and thanks for notifying.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 7:10am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/5 "2024-12-12T07:10:17Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 12, 2024, 7:10am UTC](https://help.nextcloud.com/t/mark-as-read-endpoint-for-rooms/83318/6 "2024-12-12T07:10:18Z")

</div>


