Skip to main content
PATCH
/
v1
/
regions
/
global
/
notifications
/
settings
Update notification settings
const options = {
  method: 'PATCH',
  headers: {cookie: 'session=', 'Content-Type': 'application/json'},
  body: JSON.stringify({
    channels: {slack: {enabled: true, webhookUrl: '<string>', channel: '<string>'}},
    subscriptions: {}
  })
};

fetch('https://api.example.com/v1/regions/global/notifications/settings', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "success": true,
  "data": {
    "channels": {
      "inApp": {
        "enabled": true
      },
      "email": {
        "enabled": true,
        "address": "jsmith@example.com",
        "digestFrequency": "realtime"
      },
      "slack": {
        "enabled": true,
        "webhookUrl": "<string>",
        "channel": "<string>"
      }
    },
    "subscriptions": {}
  },
  "meta": {}
}

Authorizations

session
string
cookie
required

Session-based authentication via HTTP-only cookie

Body

application/json
channels
object
subscriptions
object

Response

200 - application/json

Settings updated

success
enum<boolean>
Available options:
true
data
object

User notification settings

meta
object