Skip to content
Select themeSelect language

GET /notifications — the caller's inbox as `{items,total,facets}`.

GET
/api/notifications
curl --request GET \
--url https://example.com/api/notifications
Media typeapplication/json

GET /notifications response: the caller’s inbox as a standard list envelope.

object
facets
required

Facets for the legacy whole-inbox list. The unread badge lives under facets so every paginated/list envelope exposes {items,total,facets} consistently.

object
unread
required
integer format: int64
items
required
Array<object>

Typed projection of one user_notifications row (the UserNotification persistence model has no ToSchema derive). Mirrors its wire shape one-to-one; the handler builds it from the full model so the compiler enforces the match.

The nullable-but-always-present columns (user_id/email/body/read_at) carry #[schema(required)] (mirroring the admin.rs MeResponse/PendingUserView pattern) so the generated frontend zod keeps them required-yet-nullable rather than optional.

object
body
required

Body text; null for notifications carrying only a title.

string | null
created_at
required
string format: date-time
data
required

Context JSON (never includes raw tokens) — an open map.

object
key
additional properties
email
required

Email address; set for unregistered invitees; null for registered users.

string | null
id
required
string format: uuid
kind
required
string
organization_id
required
string format: uuid
read_at
required

When the notification was read; null while unread.

string | null format: date-time
title
required
string
user_id
required

FK to the recipient user; null for a pre-registration email-only target.

string | null format: uuid
total
required
integer format: int64
Examplegenerated
{
"facets": {
"unread": 1
},
"items": [
{
"body": "example",
"created_at": "2026-04-15T12:00:00Z",
"data": {
"additionalProperty": "example"
},
"email": "example",
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"kind": "example",
"organization_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"read_at": "2026-04-15T12:00:00Z",
"title": "example",
"user_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}
],
"total": 1
}