# notifications

In-app notification centre, per-user preferences per category and channel, push device registration.

## GET /notifications

operationId: `listNotifications`
Summary: Notification centre
API key scopes: `notifications:read`
Callable by: customer keys
Parameters: `X-Request-Id` (header), `cursor` (query), `limit` (query), `sort` (query), `filter` (query), `If-None-Match` (header)
Responses: 200 `NotificationPage`, 304, 400 `Problem`, 401 `Problem`, 403 `Problem`, 429 `Problem`, default `Problem`

**Conditional GET (P12-T07):** the response carries a weak `ETag` of its content; send it back as `If-None-Match` when polling and the API answers `304` without a body while nothing changed.

**API key scopes:** `notifications:read` (customer-level keys (`X-Tenant-Id` = the key's customer)).

## GET /notifications/{notificationId}

operationId: `getNotification`
Summary: Get a notification (deep link from push)
API key scopes: `notifications:read`
Callable by: customer keys
Parameters: `notificationId` (path, required), `X-Request-Id` (header)
Responses: 200 `Notification`, 401 `Problem`, 403 `Problem`, 404 `Problem`, 429 `Problem`, default `Problem`

Own notifications only (`404` otherwise).

**API key scopes:** `notifications:read` (customer-level keys (`X-Tenant-Id` = the key's customer)).

## POST /notifications/{notificationId}/read

operationId: `markNotificationRead`
Summary: Mark as read
API key scopes: `notifications:write`
Callable by: customer keys
Parameters: `notificationId` (path, required), `X-Request-Id` (header)
Responses: 200 `Notification`, 401 `Problem`, 403 `Problem`, 404 `Problem`, 409 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `notifications:write` (customer-level keys (`X-Tenant-Id` = the key's customer)).

## POST /notifications/read-all

operationId: `markAllNotificationsRead`
Summary: Mark all as read
API key scopes: `notifications:write`
Callable by: customer keys
Parameters: `X-Request-Id` (header)
Responses: 200 `UnreadCount`, 401 `Problem`, 403 `Problem`, 409 `Problem`, 429 `Problem`, default `Problem`

**API key scopes:** `notifications:write` (customer-level keys (`X-Tenant-Id` = the key's customer)).

## GET /notifications/unread-count

operationId: `getUnreadNotificationCount`
Summary: Unread badge count
API key scopes: `notifications:read`
Callable by: customer keys
Parameters: `X-Request-Id` (header), `If-None-Match` (header)
Responses: 200 `UnreadCount`, 304, 401 `Problem`, 403 `Problem`, 429 `Problem`, default `Problem`

**Conditional GET (P12-T07):** the response carries a weak `ETag` of its content; send it back as `If-None-Match` when polling and the API answers `304` without a body while nothing changed.

**API key scopes:** `notifications:read` (customer-level keys (`X-Tenant-Id` = the key's customer)).
