Notifications
In-App
Send real-time in-app notifications
Sending an in-app notification
await nutifar.notifications.sendInApp({
to: "user_456",
title: "New comment",
body: "Jane replied to your post",
});The recipient identifier for in-app notifications is not yet confirmed against
your backend — this doc currently assumes to maps to externalId, matching
the SSE/JWT connect-token flow. Verify against the in-app/device service
before publishing.
Multiple recipients
await nutifar.notifications.sendInApp({
to: ["user_456", "user_789"],
title: "Maintenance notice",
body: "Scheduled downtime tonight at 10pm UTC",
});Templates
await nutifar.notifications.sendInApp({
to: "user_456",
template: {
name: "new-follower",
data: { followerName: "Jane" },
},
});Receiving in-app notifications (client SDK)
Fill in once @nutifar/web's public connect/subscribe API is finalized — this
is currently in progress per your SSE + scoped JWT connect-token work.
Errors
Placeholder pending confirmation.
| Error | Cause |
|---|---|
invalid_recipient | to doesn't resolve to a known recipient identifier |
template_not_found | template.name doesn't exist for this app |