Get notification settings
const options = {method: 'GET', headers: {cookie: 'session='}};
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));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/notifications/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/global/notifications/settings \
--cookie session=import requests
url = "https://api.example.com/v1/regions/global/notifications/settings"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text){
"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": {}
}Settings
Get notification settings
Get user’s notification preferences
GET
/
v1
/
regions
/
global
/
notifications
/
settings
Get notification settings
const options = {method: 'GET', headers: {cookie: 'session='}};
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));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/regions/global/notifications/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("cookie", "session=")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url https://api.example.com/v1/regions/global/notifications/settings \
--cookie session=import requests
url = "https://api.example.com/v1/regions/global/notifications/settings"
headers = {"cookie": "session="}
response = requests.get(url, headers=headers)
print(response.text){
"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": {}
}Was this page helpful?