5 endpoints.
| Method | Path | Summary |
|---|---|---|
GET | /api/notifications | Get user's notifications |
POST | /api/notifications | Send notification to community users (admin/moderator) |
PATCH | /api/notifications/{id}/read | Mark notification as read |
PATCH | /api/notifications/read-all | Mark all notifications as read |
GET | /api/notifications/unread-count | Get unread notification count |
GET /api/notificationsAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
page | query | no | integer | — |
limit | query | no | integer | — |
unreadOnly | query | no | boolean | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Paginated list of notifications | — |
401 | Authentication required | — |
POST /api/notificationsAuth: Bearer JWT required.
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | — |
titleArabic | string | no | — |
message | string | yes | — |
messageArabic | string | no | — |
type | string | no | — |
targetUserIds | string (uuid)[] | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Notification sent successfully | — |
403 | Permission denied | — |
PATCH /api/notifications/{id}/readAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | Notification marked as read | — |
PATCH /api/notifications/read-allAuth: Bearer JWT required.
Responses
| Status | Description | Body |
|---|---|---|
200 | All notifications marked as read | — |
GET /api/notifications/unread-countAuth: Bearer JWT required.
Responses
| Status | Description | Body |
|---|---|---|
200 | Unread count | object |