Poll the bell feed
curl --request GET \
--url http://localhost:3000/api/notifications \
--header 'Origin: <api-key>'import requests
url = "http://localhost:3000/api/notifications"
headers = {"Origin": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Origin: '<api-key>'}};
fetch('http://localhost:3000/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Origin: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Origin", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/notifications")
.header("Origin", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/notifications")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Origin"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"notifications": [
{
"id": "5b0c2f8e-3a47-4d1e-9f3c-2b8e6a1d7c90",
"app_id": "324684580",
"app_name": "Spotify - Music and Podcasts",
"change_summary": [
{
"type": "added",
"description": "\"Data Linked to You\" now collects: Location"
}
],
"created_at": 1789776000000,
"read": 0,
"stale": 0,
"iconUrl": "<string>"
}
],
"unreadCount": 3
}Notifications
Poll the bell feed
Returns up to 30 notifications, newest first, and the unread count. Takes no query parameters.
The 30 newest rows are read before the per-type filters described
under Notification.change_summary run, so fewer can come back.
Label and policy change notifications written during quiet hours
stay out of the list and the count until the window ends. The seven
Settings types kept in notification_prefs (profileMismatch,
versionUpdates, importCompleted, manualAppsPrompt, aiTimeout,
jobResumed, parserFallthrough) aren’t applied here: the bell
hides those rows itself.
GET
/
api
/
notifications
Poll the bell feed
curl --request GET \
--url http://localhost:3000/api/notifications \
--header 'Origin: <api-key>'import requests
url = "http://localhost:3000/api/notifications"
headers = {"Origin": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Origin: '<api-key>'}};
fetch('http://localhost:3000/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Origin: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:3000/api/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Origin", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("http://localhost:3000/api/notifications")
.header("Origin", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/notifications")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["Origin"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"notifications": [
{
"id": "5b0c2f8e-3a47-4d1e-9f3c-2b8e6a1d7c90",
"app_id": "324684580",
"app_name": "Spotify - Music and Podcasts",
"change_summary": [
{
"type": "added",
"description": "\"Data Linked to You\" now collects: Location"
}
],
"created_at": 1789776000000,
"read": 0,
"stale": 0,
"iconUrl": "<string>"
}
],
"unreadCount": 3
}Authorizations
sameOriginadminToken
Same-origin CSRF check. The Origin header must match the request host;
enforced for every mutating verb (POST, PUT, PATCH, DELETE).
Response
200 - application/json
Notifications newest first, with the unread count.