I want to know if there’s a way to disable specific notifications—for example, badge notifications or trust level notifications—so they don’t appear in the list returned by the notifications API:
{host}/notifications.json?filter=all
My goal is to retrieve only post or chat notifications.
If it’s not possible via the API, is there a way to prevent Discourse from inserting certain notifications into the notifications list in the first place?
There is no built-in way to prevent specific notification types (like badge or trust level changes) from being included in the notifications API on retrieval. The best workaround is to fetch all notifications with the API and then filter on your application by the notification_type you care about.