# 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:** 1\
**Showing post:** 6

<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

```

---

_[View the full topic](https://meta.discourse.org/t/how-to-change-the-notification-levels-for-all-users-on-a-topic/293974)._
