/notifications/ (which is per-user; see the
Notifications API Reference).
This page is feature-flagged behind SHOW_NOTIFICATION in the reference
webapp; if off, the route redirects to /.
What you’ll build
- A paginated message list (10 per page).
- A detail view with mark-as-read.
- An unread badge that polls in the background (every ~15 min).
Prerequisites
- An authenticated user.
X-Preferred-Partner-Idset.
The call chain
On mount:| # | Method | Path | Purpose |
|---|---|---|---|
| 1 | GET | /messages/partner/?limit=10&page=1 | Paginated message list. |
| # | Method | Path | Purpose |
|---|---|---|---|
| 2 | PUT | /messages/{id}/markasread | Mark as read (only if not already). |
| Method | Path | Notes |
|---|---|---|
| GET | /messages/totalunread | { total }. Poll every 15 min (UserStatusBar.js:40 in the reference webapp). |
Response — /messages/partner/
Reference implementation
Unread badge polling
Gotchas
Two different "messages" / "notifications" surfaces
Two different "messages" / "notifications" surfaces
/messages/... is per-partner (announcements, operational).
/notifications/... is per-user (in-app activity feed). They share
no state. See the API Reference.`markasread` is fire-and-forget
`markasread` is fire-and-forget
The reference webapp doesn’t surface failures from this call — it
optimistically decrements the badge. Mirror or improve as you see fit,
but don’t block the open-message UI on the mark-as-read response.
Admin endpoints are not for partners
Admin endpoints are not for partners
GET /messages/partner/{partner_id} and POST /messages/partner/{partner_id}
are fd-admin only (cross-tenant). Never wire these into partner UI.`content` may contain HTML
`content` may contain HTML
The reference webapp renders
content via dangerouslySetInnerHTML.
Sanitise (DOMPurify) or render Markdown if the field is plaintext-only
on your tenant.Related
- Notifications API Reference — the other surface.
- Polling long-running jobs.