# How to change the notification levels for all users on a topic?

**URL:** https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974
**Category:** Support
**Created:** [February 2, 2024, 8:07pm UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974 "2024-02-02T20:07:15Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [February 2, 2024, 8:07pm UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/1 "2024-02-02T20:07:15Z")

</div>

Does anyone know a safe way to set the notification levels for all users on a topic to a single value? I’m guessing that it would be something in the Rails console.

I want to set all the users on a topic to “Mute” or “Normal” instead of “Watching” or “Tracking.”

The goal is to reduce activity on a big topic in a complex moderation situation.

---

<div class="post-metadata">

### Author: ![Heliosurge](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/heliosurge/32/571810_2.png) [@Heliosurge](https://meta.discourse.org/u/Heliosurge)
#### Post date: [February 3, 2024, 12:32am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/2 "2024-02-03T00:32:01Z")

</div>

Admin menu  
Settings  
User Preferences

* * *

Wait sorry you mean just 1 topic. Yeah imagine may need rails

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [February 3, 2024, 2:13am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/3 "2024-02-03T02:13:41Z")

</div>

> [@j127](#):
>
> The goal is to reduce activity on a big topic in a complex moderation situation.

What about enabling Slow Mode? Would not it help to reduce the activity? 🤔

 ![image](https://global.discourse-cdn.com/meta/original/4X/7/6/8/7681a6895c44aef28b76323a78ce327472210095.png)

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [February 3, 2024, 4:49am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/4 "2024-02-03T04:49:21Z")

</div>

> [@Arkshine](#):
>
> What about enabling Slow Mode?

This situation is complex and I don’t want a visual indication that triggers a public discussion about it that might take up hours of moderation time. (I’m already completely overwhelmed.) The ideal outcome is that people just aren’t reminded that the topic exists.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [February 3, 2024, 6:55am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/5 "2024-02-03T06:55:22Z")

</div>

I would unlist the topic. Then it is hidden from the forum so probably most users won’t see it there anymore. But when they have a link to that topic (e.g., because they received a notification), they can still open the topic.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [February 3, 2024, 7:36am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/6 "2024-02-03T07:36:10Z")

</div>

Though, just to note, if they’re Watching it then they’d still get notifications when it’s Unlisted.

> [@j127](#):
>
> Does anyone know a safe way to set the notification levels for all users on a topic to a single value? I’m guessing that it would be something in the Rails console.

I think you can now use the `/t/TOPIC_ID/notifications` endpoint to set the notification level for a user on a specific topic, if that’s a more appealing choice than the rails console?

> **Extra details**
>
> - The API user should be an admin(so they should have global scope) to be able to change another user’s notification level.
> - Endpoint URL: `siteurl/t/<topic_id>/notifications`
> - Request type: `POST`
> - Parameters:
> - `username` or `external_id` of the target user. If empty, the admin’s own notifcation level for the topic will be changed.
> - `notification_level`: integer value corresponding to the level
> - `muted: 0,`
> - `regular: 1,`
> - `normal: 1, # alias for regular`
> - `tracking: 2,`
> - `watching: 3,`

But for the rails console I think it would be this: (remember to take a backup just in case before trying to change things in rails ⚠)

```plaintext
TopicUser.where(topic_id: TOPIC_ID).update(notification_level: 1)

```

(1 is normal, 0 is mute)

That would change the topic level ones, but there may be category and tag level ones which may still affect who gets a ping for new activity.

And a little [data explorer](https://meta.discourse.org/t/32566?silent=true) query to check the levels for users on a topic if that’s useful too:

```sql
SELECT 
    topic_id,
    user_id,
    notification_level
FROM topic_users
WHERE topic_id = TOPIC_ID

```

---

<div class="post-metadata">

### Author: ![j127](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/j127/32/79093_2.png) [@j127](https://meta.discourse.org/u/j127)
#### Post date: [February 3, 2024, 9:26am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/7 "2024-02-03T09:26:33Z")

</div>

> [@JammyDodger](#):
>
> I think you can now use the `/t/TOPIC_ID/notifications` endpoint to set the notification level for a user on a specific topic, if that’s a more appealing choice than the rails console?

Thanks for the detailed response. I’ll try the API tomorrow.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 4, 2024, 9:27am UTC](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974/8 "2024-03-04T09:27:31Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
