Reference
Notifications
Per-user in-app notifications driven by Laravel's database notification
channel. Notifications carry a type (Laravel class FQN) and a data payload
specific to the notification.
List notifications
Lists the notifications of the user the token belongs to, newest first.
Pass unread=true to restrict to unread items.
GET
/api/notifications
Query parameters
-
unreadbooleanOnly return unread notifications.
Example:
true -
per_pageintegerRows per page. Default 25, maximum 100. See Lists, paging and filters.
Example:
25
curl --request GET \
--get "https://klozzo.com/api/notifications?unread=1&per_page=25" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://klozzo.com/api/notifications"
);
const params = {
"unread": "1",
"per_page": "25",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://klozzo.com/api/notifications';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'unread' => '1',
'per_page' => '25',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://klozzo.com/api/notifications'
params = {
'unread': '1',
'per_page': '25',
}
headers = {
'Authorization': 'Bearer {YOUR_API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers, params=params)
response.json()
{
"data": [
{
"id": "9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234",
"type": "App\\Notifications\\NewMessageReceived",
"data": {
"conversation_id": 17,
"preview": "Hi Ada!"
},
"read_at": null,
"created_at": "2026-06-05T13:42:00+00:00"
}
],
"meta": {
"current_page": 1,
"last_page": 4,
"per_page": 25,
"total": 87,
"unread_count": 12
}
}
-
dataobject[]-
idstring -
typestring -
dataobject-
conversation_idinteger -
previewstring
-
-
read_atstring -
created_atstring
-
-
metaobject-
current_pageinteger -
last_pageinteger -
per_pageinteger -
totalinteger -
unread_countinteger
-
Unread count
Returns how many notifications you have unread, as a single integer — a lightweight endpoint for badge polling.
GET
/api/notifications/unread-count
curl --request GET \
--get "https://klozzo.com/api/notifications/unread-count" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://klozzo.com/api/notifications/unread-count"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://klozzo.com/api/notifications/unread-count';
$response = $client->get(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://klozzo.com/api/notifications/unread-count'
headers = {
'Authorization': 'Bearer {YOUR_API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('GET', url, headers=headers)
response.json()
{
"unread_count": 12
}
-
unread_countinteger
Mark a notification as read
Marks one notification as read. Idempotent: marking an already-read notification is a no-op (returns the existing read_at).
POST
/api/notifications/{id}/read
Path parameters
-
idstring requiredNotification UUID.
Example:
9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234
curl --request POST \
"https://klozzo.com/api/notifications/9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234/read" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://klozzo.com/api/notifications/9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234/read"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://klozzo.com/api/notifications/9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234/read';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://klozzo.com/api/notifications/9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234/read'
headers = {
'Authorization': 'Bearer {YOUR_API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
{
"data": {
"id": "9c8b9e15-79b7-4a2a-9b2c-0f56b2b0a234",
"type": "App\\Notifications\\NewMessageReceived",
"data": {
"conversation_id": 17,
"preview": "Hi Ada!"
},
"read_at": "2026-06-05T13:43:00+00:00",
"created_at": "2026-06-05T13:42:00+00:00"
},
"unread_count": 11
}
-
dataobject-
idstring -
typestring -
dataobject-
conversation_idinteger -
previewstring
-
-
read_atstring -
created_atstring
-
-
unread_countinteger
{
"message": "Not Found"
}
Every error shares the same shape — message and errors.
See Errors.
Mark all notifications as read
Marks every notification of the user the token belongs to as read, in one call. It affects your notifications only — the ones belonging to the user the token was issued for — so it can never clear somebody else's inbox.
POST
/api/notifications/read-all
Marking everything read is not the same as deleting: the notifications stay readable, they just stop counting.
curl --request POST \
"https://klozzo.com/api/notifications/read-all" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://klozzo.com/api/notifications/read-all"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://klozzo.com/api/notifications/read-all';
$response = $client->post(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://klozzo.com/api/notifications/read-all'
headers = {
'Authorization': 'Bearer {YOUR_API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('POST', url, headers=headers)
response.json()
{
"unread_count": 0
}
-
unread_countinteger
Update notification preferences
Updates your notification preferences. Currently only the muted list is
supported — notifications whose type
matches an entry in the list are skipped at delivery time. Provide the
full desired list (full-replace, not append).
PUT
/api/notifications/preferences
Body parameters
-
mutedstring[]Notification types to mute.
Example:
["App\\Notifications\\NewMessageReceived"]
curl --request PUT \
"https://klozzo.com/api/notifications/preferences" \
--header "Authorization: Bearer {YOUR_API_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"muted\": [
\"App\\\\Notifications\\\\NewMessageReceived\"
]
}"
const url = new URL(
"https://klozzo.com/api/notifications/preferences"
);
const headers = {
"Authorization": "Bearer {YOUR_API_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"muted": [
"App\\Notifications\\NewMessageReceived"
]
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://klozzo.com/api/notifications/preferences';
$response = $client->put(
$url,
[
'headers' => [
'Authorization' => 'Bearer {YOUR_API_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'muted' => ['App\\Notifications\\NewMessageReceived'],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json
url = 'https://klozzo.com/api/notifications/preferences'
payload = {
"muted": [
"App\\Notifications\\NewMessageReceived"
]
}
headers = {
'Authorization': 'Bearer {YOUR_API_TOKEN}',
'Content-Type': 'application/json',
'Accept': 'application/json'
}
response = requests.request('PUT', url, headers=headers, json=payload)
response.json()
{
"data": {
"muted": [
"App\\Notifications\\NewMessageReceived"
]
}
}
-
dataobject-
mutedstring[]
-
{
"message": "Muted debe ser una lista.",
"errors": {
"muted": [
"Muted debe ser una lista."
]
}
}
Every error shares the same shape — message and errors.
See Errors.