# Query Total unread notifications for user

**URL:** <https://forums.rocket.chat/t/query-total-unread-notifications-for-user/11745>\
**Category:** Community Support\
**Created:** [July 26, 2021, 7:16am UTC](https://forums.rocket.chat/t/query-total-unread-notifications-for-user/11745 "2021-07-26T07:16:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ayudh37](https://avatars.discourse-cdn.com/v4/letter/a/3be4f8/32.png) [@ayudh37](https://forums.rocket.chat/u/ayudh37)\
**Post date:** [July 26, 2021, 7:16am UTC](https://forums.rocket.chat/t/query-total-unread-notifications-for-user/11745/1 "2021-07-26T07:16:25Z")

</div>

I understand there isn’t any REST API we can use to query the total unread messages for a user across all channels/groups/DMs/etc. I also know that this question has sort of been answered here: [How to get unread message via rest api in Rocket.chat - Stack Overflow](https://stackoverflow.com/questions/45730833/how-to-get-unread-message-via-rest-api-in-rocket-chat/45752751#45752751)

However the answer on the stackoverflow post is only for one room at a time and I would like to know how I can get that number in the red icon in the following image:  
 ![hamburger_notification](https://us1.discourse-cdn.com/flex021/uploads/rocketchat/original/2X/b/b3d66a789b077265c7f95bdd9a01985990813485.png)

How is this calculated? Is this number accessible somewhere in the RC mongo collections? Or is it calculated somehow which I can mimic to get it?

Thank you!

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [July 26, 2021, 11:05am UTC](https://forums.rocket.chat/t/query-total-unread-notifications-for-user/11745/2 "2021-07-26T11:05:55Z")

</div>

> [@ayudh37](#):
>
> how I can get that number in the red icon in the following image:

> [@ayudh37](#):
>
> How is this calculated? Is this number accessible somewhere in the RC mongo collections? Or is it calculated somehow which I can mimic to get it?

I have absolutely no idea. I would imagine calculated.

I’ll try and ask a dev for a comment.

---

<div class="post-metadata">

**Author:** ![john.crisp](https://sea1.discourse-cdn.com/flex021/user_avatar/forums.rocket.chat/john.crisp/32/2711_2.png) [@john.crisp](https://forums.rocket.chat/u/john.crisp)\
**Post date:** [July 26, 2021, 11:11am UTC](https://forums.rocket.chat/t/query-total-unread-notifications-for-user/11745/3 "2021-07-26T11:11:26Z")

</div>

So

> It’s an attribute on the subscription collection, should be readable from the REST API

> `subscriptions.get` ` should return it

> **[Subscriptions Endpoints](https://developer.rocket.chat/reference/api/rest-api/endpoints/statistics/subscriptions-endpoints)**
