Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
44 lines (34 loc) · 3.77 KB

set-room-notifications.md

File metadata and controls

44 lines (34 loc) · 3.77 KB

Set Room Notifications

Sets the notification settings of a specific room.

HTTP MethodURLRequires Auth
POST/api/v1/rooms.saveNotificationyes

Body Parameters

KeyExample ValueDescription
roomId*5of4weEXaH7yncxz9The channel's id
notifications*"notifications": {...}The object that contains the following parameters.
desktopNotificationsnothing

The value for desktop notifications. The options are:

  • nothing
  • mentions
  • all
  • default
disableNotifications0

The value to disable/enable channel's notifications.

The options are:

  • 0
  • 1
emailNotificationsnothing

The value for email notifications.

The options are:

  • nothing
  • mentions
  • all
  • default
audioNotificationsnothing

The value for audio notifications.

The options are:

  • nothing
  • mentions
  • all
  • default
mobilePushNotificationsnothing

The value for mobile push notifications.

The options are:

  • nothing
  • mentions
  • all
  • default
audioNotificationValuebeepThe value for audio notification sound.
desktopNotificationDuration0The value for desktop notification duration.
unreadAlertnothing

The value for unread alerts notifications.

The options are:

  • nothing
  • mentions
  • all
  • default
hideUnreadStatus0

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

Version Description
0.63.0 Added