curl --request POST \
--url https://atollhq.com/api/orgs/{id}/notifications/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"channel": "in_app"
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/notifications/preferences"
payload = {
"enabled": True,
"channel": "in_app"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, channel: 'in_app'})
};
fetch('https://atollhq.com/api/orgs/{id}/notifications/preferences', 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://atollhq.com/api/orgs/{id}/notifications/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'channel' => 'in_app'
]),
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://atollhq.com/api/orgs/{id}/notifications/preferences"
payload := strings.NewReader("{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://atollhq.com/api/orgs/{id}/notifications/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/notifications/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}"
response = http.request(request)
puts response.read_body{
"preference": {
"org_id": "<string>",
"member_id": "<string>",
"event_type": "mention.created",
"channel": "in_app",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}Update current member notification preferences
Updates the current org member notification preference for in_app or google_chat delivery. The google_chat mention.created preference controls mentions, assignments, and direct replies; ordinary comments and status changes are excluded. Setting enabled=false for in_app mention.created also attempts to acknowledge current unread mention notifications. Disabling google_chat only stops future Chat deliveries.
curl --request POST \
--url https://atollhq.com/api/orgs/{id}/notifications/preferences \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"channel": "in_app"
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/notifications/preferences"
payload = {
"enabled": True,
"channel": "in_app"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true, channel: 'in_app'})
};
fetch('https://atollhq.com/api/orgs/{id}/notifications/preferences', 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://atollhq.com/api/orgs/{id}/notifications/preferences",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'channel' => 'in_app'
]),
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://atollhq.com/api/orgs/{id}/notifications/preferences"
payload := strings.NewReader("{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://atollhq.com/api/orgs/{id}/notifications/preferences")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/notifications/preferences")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"channel\": \"in_app\"\n}"
response = http.request(request)
puts response.read_body{
"preference": {
"org_id": "<string>",
"member_id": "<string>",
"event_type": "mention.created",
"channel": "in_app",
"enabled": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
id identifier
Body
Response
Successful response
Current-member notification preference. Supported channels are in_app and google_chat; the google_chat mention.created preference controls mentions, assignments, and direct replies, while ordinary comments and status changes are excluded. Google Chat delivery is independent from in-app delivery. Disabling google_chat does not acknowledge or clear in-app notifications. Disabling in_app mention.created delivery also attempts to acknowledge current unread mention notifications.
Show child attributes
Show child attributes

