GET /notifications — the caller's inbox as `{items,total,facets}`.
const url = 'https://example.com/api/notifications';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/notificationsResponses
Section titled “Responses”GET /notifications response: the caller’s inbox as a standard list envelope.
object
Facets for the legacy whole-inbox list. The unread badge lives under facets
so every paginated/list envelope exposes {items,total,facets} consistently.
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 text; null for notifications carrying only a title.
Context JSON (never includes raw tokens) — an open map.
object
Email address; set for unregistered invitees; null for registered users.
When the notification was read; null while unread.
FK to the recipient user; null for a pre-registration email-only target.
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}