Skip to content
Select themeSelect language

`GET /api/notifications/board` — one server-paginated, filtered + sorted page of the caller's notifications plus the total + the facet chips.

GET
/api/notifications/board
curl --request GET \
--url https://example.com/api/notifications/board \
--cookie supacloud_session=<supacloud_session>
q
string

Free-text search over the title + body.

kind
string

kind filter chip.

unread_only
boolean

Restrict to unread notifications (default false — the whole inbox).

sort
string

Whitelisted sort column: created_at | read_at. Default created_at.

dir
string

asc | desc (default desc).

limit
integer format: int64
offset
integer format: int64
include_facets
boolean

Recompute the facet chips (default true). The board sends false on a page/sort change since the chip counts are user-wide.

One page of notifications.

Media typeapplication/json

GET /api/notifications/board body — one page of notifications + total + facet chips.

object
facets
One of:
null
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": {
"by_kind": [
{
"count": 1,
"value": "example"
}
],
"read": 1,
"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
}

Structured client error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Authentication required

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}

Structured server error

Media typeapplication/json

The canonical JSON body of every error response — the single source of truth the frontend binds to. Every AppError serializes as this exact shape, and the generated OpenAPI component ApiErrorBody (with its ErrorCode enum) is what the frontend error schema is generated from, so there is no hand-written error schema on either end.

object
code
required

Machine-readable, stable error code.

string
Allowed values: not_found unauthorized forbidden bad_request unprocessable precondition_failed conflict method_not_allowed rate_limited quota_exceeded database_error docker_error vault_error internal_error
details
One of:
null
error
required

Human-readable message (the server’s English text; the client may localize by code).

string
Example
{
"code": "not_found"
}