# Checking for New Chat Messages via API

**URL:** <https://meta.discourse.org/t/checking-for-new-chat-messages-via-api/309749>\
**Category:** Development\
**Tags:** chat, rest-api\
**Created:** [May 28, 2024, 7:55pm UTC](https://meta.discourse.org/t/checking-for-new-chat-messages-via-api/309749 "2024-05-28T19:55:10Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Earnie\_Baird](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/earnie_baird/32/380079_2.png) [@Earnie\_Baird](https://meta.discourse.org/u/Earnie_Baird)\
**Post date:** [May 28, 2024, 7:55pm UTC](https://meta.discourse.org/t/checking-for-new-chat-messages-via-api/309749/1 "2024-05-28T19:55:10Z")

</div>

Hello,

I’m integrating Discourse into another app and am trying to surface whether someone has any new chat activity pending via the API. If there are any new messages I just want to show a red badge.

More specifically, I’m trying to leverage whatever preferences the customer has set in their “chat\_header\_indicator\_preference” and at the moment I have that set to “all\_new” which I think should show any new messages in channels I belong to as well as unread mentions/DMs.

I was hoping that by going to _/session/current.json_ I would be able to see something there I can use for this but haven’t seen anything useful.

Is there any API endpoint out there I can use to understand if there are new messages based on a user’s chat\_header\_indicator\_preference ??

---

_[View the full topic](https://meta.discourse.org/t/checking-for-new-chat-messages-via-api/309749)._
