Mark all alerts read (V2)
curl --request PUT \
--url https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read', 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.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read"
req, _ := http.NewRequest("PUT", 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.put("https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}
Companies & fleet
Mark all alerts read
Marks the token’s alert records (the 10 types returned by Alert records) as read, across all its companies.
PUT
/
v2
/
api
/
companies
/
{id}
/
set-all-alerts-read
Mark all alerts read (V2)
curl --request PUT \
--url https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read"
headers = {"Authorization": "Bearer <token>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read', 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.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
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.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read"
req, _ := http.NewRequest("PUT", 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.put("https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.telemax.com.au/v2/api/companies/{id}/set-all-alerts-read")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{}
Overview
Marks every stored alert record of the 10 types returned by Alert records as read, across every company the token can read (its own company and its direct sub-companies that are not cancelled), whatever{id} is. There is no date limit, and records of deleted alert definitions are included. Records that are already read stay read. {id} must be one of the token’s companies, otherwise the call returns 404.
This cannot be undone in bulk: records can only be marked unread one at a time with Update alert read status, and some records cannot be addressed by it at all (see its Warning). The read flag is shared with the Telemax Dashboard, so Dashboard users see the records as read too.
startDate and endDate are not supported: if sent, they are ignored and every record is marked.
The V1 version of this endpoint is Mark all alerts read.
Rate limit: 4 req/s · 20/min · 600/hr · 14,400/day
Endpoint
PUT /v2/api/companies/{id}/set-all-alerts-read
Path parameters
integer
required
Company ID.
Response
200 OK — empty body on success.Error responses
| Status | Meaning |
|---|---|
| 401 | Missing, invalid or expired bearer token (INVALID_CREDENTIALS) |
| 403 | The API key lacks this endpoint’s permission (INVALID_SCOPE), or the company is suspended (CompanySuspended) — see 403 Forbidden |
| 404 | Company not found or not in caller’s accessible hierarchy |
| 422 | {id} is not an integer |
curl -X PUT "https://api.telemax.com.au/v2/api/companies/12/set-all-alerts-read" \
-H "Authorization: Bearer <token>"
Authorizations
JWT Bearer token obtained from POST /v2/api/authentication/token/api-key.
Lifetime: ~24 hours (86,399 seconds). Cache the token and reuse it. Re-authenticate 5 minutes before expiry.
Scoping: API key tokens are scoped by the key's company and its action set; see Token scoping.
No refresh endpoint — re-authenticate with your API key when the token expires.
Path Parameters
Response
200 OK — Empty body. Every record of the 10 types across the token's companies is marked as read.
Was this page helpful?