Skip to content

REST Endpoints — Inbox, Preferences, Subscriptions & Push Tokens

Granit.Notifications.Endpoints maps all endpoints under the /notifications prefix (configurable via NotificationEndpointsOptions.RoutePrefix). All endpoints require authentication and a permission from NotificationPermissions.

PermissionScope
Notifications.UserNotifications.ReadRead-only access (inbox, counts, preferences, subscriptions, followers)
Notifications.UserNotifications.ManageWrite access (mark read, update preferences, subscribe, follow, push tokens)
MethodRoutePermissionDescription
GET/notificationsReadUser’s notification inbox (paged, newest first)
GET/notifications/unread/countReadUnread notification count
POST/notifications/{id}/readManageMark a single notification as read
POST/notifications/read-allManageMark all notifications as read
MethodRoutePermissionDescription
GET/notifications/entity/{entityType}/{entityId}ReadActivity feed for a specific entity
MethodRoutePermissionDescription
GET/notifications/preferencesReadUser’s delivery preferences
PUT/notifications/preferencesManageCreate or update a preference
GET/notifications/typesReadList all registered notification type definitions
MethodRoutePermissionDescription
GET/notifications/subscriptionsReadUser’s topic subscriptions
POST/notifications/subscriptions/{typeName}ManageSubscribe to a notification type
DELETE/notifications/subscriptions/{typeName}ManageUnsubscribe from a notification type
MethodRoutePermissionDescription
POST/notifications/entity/{entityType}/{entityId}/followManageFollow an entity
DELETE/notifications/entity/{entityType}/{entityId}/followManageUnfollow an entity
GET/notifications/entity/{entityType}/{entityId}/followersReadList entity followers

Mapped separately via MapGranitMobilePushTokens() under api/notifications/mobile-push/tokens:

MethodRoutePermissionDescription
POST/api/notifications/mobile-push/tokensManageRegister a device token
DELETE/api/notifications/mobile-push/tokens/{deviceToken}ManageRemove a device token (owner-scoped)
GET/api/notifications/mobile-push/tokensReadList current user’s device tokens