Set Room Notifications

Sets the notification settings of a specific room.

HTTP MethodURLRequires Auth

POST

/api/v1/rooms.saveNotification

Body Parameters

KeyExample ValueDescription

roomId*

5of4weEXaH7yncxz9

The channel's id

notifications*

"notifications": {...}

The object that contains the following parameters.

desktopNotifications

nothing

The value for desktop notifications. The options are:

  • nothing

  • mentions

  • all

  • default

disableNotifications

0

The value to disable/enable channel's notifications.

The options are:

  • 0

  • 1

emailNotifications

nothing

The value for email notifications.

The options are:

  • nothing

  • mentions

  • all

  • default

audioNotifications

nothing

The value for audio notifications.

The options are:

  • nothing

  • mentions

  • all

  • default

mobilePushNotifications

nothing

The value for mobile push notifications.

The options are:

  • nothing

  • mentions

  • all

  • default

audioNotificationValue

beep

The value for audio notification sound.

desktopNotificationDuration

0

The value for desktop notification duration.

unreadAlert

nothing

The value for unread alerts notifications.

The options are:

  • nothing

  • mentions

  • all

  • default

hideUnreadStatus

0

The value to disable/enable number of unread messages.

The options are:

  • 0

  • 1

Example Call

curl -H "X-Auth-Token: 9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq" \
     -H "X-User-Id: aobEdbYhXfu5hkeqG" \
     -H "Content-type: application/json" \
     http://localhost:3000/api/v1/rooms.saveNotification \
     -d '{
          "roomId": "5of4weEXaH7yncxz9", 
          "notifications" :{ 
               "desktopNotifications": "all", 
               "disableNotifications": "0", 
               "emailNotifications": "nothing", 
               "audioNotificationValue": "beep", 
               "desktopNotificationDuration": "2", 
               "audioNotifications": "all", 
               "unreadAlert": "nothing", 
               "hideUnreadStatus": "all", 
               "mobilePushNotifications": "mentions"} }'

Example Response

{
   "success": true
}

Change Log

VersionDescription

0.63.0

Added

Last updated

Rocket.Chat versions receive support for six months after release.