PRMS delivers notifications through two complementary surfaces: in-app notifications accessible via the REST API, and real-time push events delivered over WebSockets using Pusher. Both surfaces are scoped to the authenticated user — every call is resolved from the JWT in theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/AllianceBioversityCIAT/onecgiar_pr/llms.txt
Use this file to discover all available pages before exploring further.
auth header.
All endpoints require a valid JWT. There is no public or anonymous access. Unauthorized or missing tokens return 401. The auth header carries the raw JWT (not a Bearer prefix — see the authentication overview).
Notification types
Notifications are classified by level and type. The level controls scope; the type identifies the triggering event:NotificationLevelEnum | Scope |
|---|---|
Application | System-wide announcements, not tied to a specific result. |
Result | Events scoped to a specific result (status changes, QA decisions). |
NotificationTypeEnum | Trigger |
|---|---|
Result Created | A new result was created in an initiative the user belongs to. |
Result Submitted | A result was submitted for QA review. |
Result Unsubmitted | A previously submitted result was pulled back to Editing. |
Result QAed | QA assessment was completed on a result. |
Announcement | A system-wide announcement was broadcast by an admin. |
notification_id, notification_level, notification_type, target_user, emitter_user, result_id (nullable for application-level), text, read (boolean), created_date, and read_date.
In-app notifications
Retrieve all notifications
auth header).
Response: array of notification objects.
Retrieve pop-up notifications
Recent result activity
limit result-related notifications for the authenticated user. Defaults to 10 if the parameter is absent or invalid.
Maximum number of activity items to return. Must be a positive integer. Defaults to
10.Mark a notification as read
read flag to true and records the read_date timestamp on a single notification.
ID of the notification to mark as read.
Mark all notifications as read
Create an announcement (admin)
The announcement message text. Example:
"The system will be open for QA review from June 15 to June 25."201 Created on success. 500 if the notification could not be emitted.
Real-time delivery
In addition to REST polling, PRMS pushes notification events to connected clients using Pusher. Thesocket-management microservice (shared/microservices/socket-management/) manages the Pusher integration. When a result status changes or an announcement is created, the server emits a Pusher event on the user’s private channel; the Angular client subscribes via pusher-js.
The REST endpoints above reflect the persisted state of notifications. Real-time events arrive independently over the WebSocket channel. If a client misses a real-time event (for example, when offline), it can recover by polling
GET /api/notification/updates.User notification settings
Users can control which email notification channels are enabled on a per-initiative basis. These settings are stored in theuser_notification_settings table and are checked by the email dispatch service before sending any outbound mail.
Get all settings
auth header).
Get settings for an initiative
ID of the initiative (Init, SGP, or Platform) to retrieve settings for.
404 if the user or initiative is not found.
Update settings
UserNotificationSettingDto objects.
ID of the initiative (Init/SGP/Platform) this preference applies to.
When
true, the user receives email notifications for contribution requests on this initiative. Defaults to the current persisted value if omitted.When
true, the user receives email update notifications for this initiative. Defaults to the current persisted value if omitted.201 on success. 404 if the user or initiative is not found. 500 on internal error.
Email dispatch in PRMS always checks user preferences before sending. Setting
email_notifications_contributing_request_enabled: false for an initiative suppresses all contribution-request emails for that initiative, regardless of the triggering event.