curl --request GET \
--url https://api.duvo.ai/v2/teams/{teamId}/notifications/counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/notifications/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/teams/{teamId}/notifications/counts', 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.duvo.ai/v2/teams/{teamId}/notifications/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://api.duvo.ai/v2/teams/{teamId}/notifications/counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.duvo.ai/v2/teams/{teamId}/notifications/counts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/notifications/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Get Notification Counts
Per-type notification counts for the authenticated user’s current team. Narrow with unread, important, and with either severity (counts only that exact severity) or minSeverity (counts that urgency and above) — the two are mutually exclusive and a request carrying both is rejected with 400. Pass the same filters the feed is showing, so the counts describe the list the reader would land on. Requires the Notification Center feature; returns 404 when it is not enabled for the team.
curl --request GET \
--url https://api.duvo.ai/v2/teams/{teamId}/notifications/counts \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.duvo.ai/v2/teams/{teamId}/notifications/counts"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.duvo.ai/v2/teams/{teamId}/notifications/counts', 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.duvo.ai/v2/teams/{teamId}/notifications/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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 := "https://api.duvo.ai/v2/teams/{teamId}/notifications/counts"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.duvo.ai/v2/teams/{teamId}/notifications/counts")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.duvo.ai/v2/teams/{teamId}/notifications/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
API key authentication. Get your API key from the Duvo dashboard.
Path Parameters
Query Parameters
If true, only count unread notifications.
true, false Only count notifications with exactly this severity, so the counts match a feed filtered the same way. Mutually exclusive with minSeverity.
info, warning, critical, success Only count notifications at or above this urgency, so the counts match a feed filtered the same way. Least to most urgent: success < info < warning < critical. Mutually exclusive with severity.
info, warning, critical, success If true, only count notifications pinned to Important for you: unresolved, undismissed connection_broken rows you can reconnect yourself. Use it to size the sidebar alert without paging the list.
true, false When 'mine', only count notifications for agents the authenticated user created (plus connection_broken, which is always counted), so the counts match a feed filtered the same way.
mine Response
Default Response
0 <= x <= 9007199254740991Was this page helpful?