MARKING NOTIFICATIONS AS SEEN
There seems to be no way using the api to mark the notificaiton as seen, I want to mark it as seen so it doesnt apepar int he users list.
9 Replies
Hi @winston.tech, I'm an AI assistant knowledgeable about Novu. While a team member is able to review this question, I'll look through relevant sources and see if I can provide suggestions. Please tag @Ask Inkeep with any follow-up questions.
-----------------------------
While I generate an answer, here are some sources that might be helpful:
* Mark a subscriber feed messages as seen or as read
* Africa's Talking
* Marks all the subscriber messages as read, unread, seen or unseen. Optionally you can pass feed id (or array) to mark messages of a particular feed.
* Headless API Reference
-----------------------------
Answer
Novu does indeed provide a way to mark notifications as seen using their API. There are two relevant endpoints you can use depending on your specific needs:
1. To mark individual subscriber feed messages as seen or as read, you can use the following endpoint:
This allows you to specify which messages to mark as seen by providing the
messageId
(1) .
2. If you need to mark all messages for a subscriber as seen, you can use this endpoint:
This endpoint enables you to mark all messages as seen, optionally filtered by feed identifier (2) .
Both of these methods provide a way to manage notification visibility for users, ensuring that once a notification has been seen, it can be marked accordingly and not clutter the user's list of notifications.Got it. Tagging @Support for additional help.
I WANT TO BE ABLE TO MARK IT AS SEEN AND THEN NOT HAVE THE APPEAR IN THE LIST
You can filter out messages that have been marked as seen with the seen query parameter of the get in app notifications endpoint. https://docs.novu.co/api-reference/subscribers/get-in-app-notification-feed-for-a-particular-subscriber
There is no way to prevent notifications from appearing in an unfiltered feed list except via deleting them.
@winston.tech
on marking as read/seen, novu just change the status of message. it does not remove it from UI. if you permanently wants to remove the in-app message (notification) then you can delete the message using delete message api
or you can achieve this by adding client side filtration logic as suggested by @Mei
@Pawan Jain
What about the old endpoint?
/novu/$subscriberId/messages/$messageId/seen
does this not exist anymore?
@Ask Inkeep
@Laiix
Yes it exist but it will not remove in-app notification from UI
Thx 🙂