Change your notification settings
curl --request PUT \
--url https://api.example.com/api/notifications/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"digest_hour": 11,
"timezone": "<string>",
"quiet_start": "<string>",
"quiet_end": "<string>",
"clear_quiet_hours": false,
"topics": {}
}
'import requests
url = "https://api.example.com/api/notifications/settings"
payload = {
"email_enabled": True,
"digest_hour": 11,
"timezone": "<string>",
"quiet_start": "<string>",
"quiet_end": "<string>",
"clear_quiet_hours": False,
"topics": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
digest_hour: 11,
timezone: '<string>',
quiet_start: '<string>',
quiet_end: '<string>',
clear_quiet_hours: false,
topics: {}
})
};
fetch('https://api.example.com/api/notifications/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/notifications/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_enabled' => true,
'digest_hour' => 11,
'timezone' => '<string>',
'quiet_start' => '<string>',
'quiet_end' => '<string>',
'clear_quiet_hours' => false,
'topics' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/notifications/settings"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/notifications/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/notifications/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}"
response = http.request(request)
puts response.read_body{
"email": {
"enabled": true,
"cadence": "immediate",
"digest_hour": 11,
"address": "<string>"
},
"timezone": "<string>",
"channels": {},
"topics": [
{
"key": "<string>",
"category": "reviews",
"label": "<string>",
"hint": "<string>",
"channels": {}
}
],
"quiet_start": "<string>",
"quiet_end": "<string>"
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Notifications
Change your notification settings
Change any of your settings; fields left out stay as they are.
PUT
/
api
/
notifications
/
settings
Change your notification settings
curl --request PUT \
--url https://api.example.com/api/notifications/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email_enabled": true,
"digest_hour": 11,
"timezone": "<string>",
"quiet_start": "<string>",
"quiet_end": "<string>",
"clear_quiet_hours": false,
"topics": {}
}
'import requests
url = "https://api.example.com/api/notifications/settings"
payload = {
"email_enabled": True,
"digest_hour": 11,
"timezone": "<string>",
"quiet_start": "<string>",
"quiet_end": "<string>",
"clear_quiet_hours": False,
"topics": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email_enabled: true,
digest_hour: 11,
timezone: '<string>',
quiet_start: '<string>',
quiet_end: '<string>',
clear_quiet_hours: false,
topics: {}
})
};
fetch('https://api.example.com/api/notifications/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/notifications/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'email_enabled' => true,
'digest_hour' => 11,
'timezone' => '<string>',
'quiet_start' => '<string>',
'quiet_end' => '<string>',
'clear_quiet_hours' => false,
'topics' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/notifications/settings"
payload := strings.NewReader("{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/notifications/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/notifications/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email_enabled\": true,\n \"digest_hour\": 11,\n \"timezone\": \"<string>\",\n \"quiet_start\": \"<string>\",\n \"quiet_end\": \"<string>\",\n \"clear_quiet_hours\": false,\n \"topics\": {}\n}"
response = http.request(request)
puts response.read_body{
"email": {
"enabled": true,
"cadence": "immediate",
"digest_hour": 11,
"address": "<string>"
},
"timezone": "<string>",
"channels": {},
"topics": [
{
"key": "<string>",
"category": "reviews",
"label": "<string>",
"hint": "<string>",
"channels": {}
}
],
"quiet_start": "<string>",
"quiet_end": "<string>"
}{
"error": "<string>",
"code": 500
}{
"error": "<string>",
"code": 500
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
OAuth2AuthorizationCodeBearerAPIKeyHeader
The access token received from the authorization server in the OAuth 2.0 flow.
Body
application/json
A change to the caller's settings. Fields left out stay as they are.
Available options:
immediate, hourly, daily Required range:
0 <= x <= 23Maximum string length:
64Pattern:
^([01]\d|2[0-3]):[0-5]\d$Pattern:
^([01]\d|2[0-3]):[0-5]\d$Turn quiet hours off.
Per topic, per channel. Unknown topics are refused.
Show child attributes
Show child attributes
Response
Successful Response
The caller's notification settings.
The caller's email delivery.
Show child attributes
Show child attributes
IANA time zone for digests and quiet hours.
What each channel looks like for the caller.
Show child attributes
Show child attributes
The settings grid.
Show child attributes
Show child attributes
HH:MM, local.
HH:MM, local.
Was this page helpful?

