# Notifications

Notifications are scoped to your account. Every list is returned by the API for the signed-in
caller, and mark-as-read sends only ids the list actually received.

## What triggers a notification

| Event | Endpoint |
| --- | --- |
| Someone follows you | `POST /social/follow/:userId` |
| Someone appreciates your post | `POST /social/posts/:postId/reactions` |
| Someone comments on your post | `POST /social/posts/:postId/comments` |
| Someone replies to your comment | `POST /social/posts/:postId/comments` (with `parentId`) |
| Someone mentions you (`@username`) | post or comment containing `@username` |
| Someone reposts or quotes your post | `POST /social/posts/:postId/repost` |
| A project you own launches | `PROJECT_LAUNCH` post linked to your project |
| Someone saves your post | `POST /social/posts/:postId/saves` |
| A community event (join, mention, pin) | community endpoints |
| A new direct message | `POST /social/conversations/:conversationId/messages` |

Self-directed comments and self-replies do not notify anyone — the notification service drops
them inside the call, so replying to your own comment notifies nobody.

## Endpoints

| Endpoint | What it does |
| --- | --- |
| `GET /social/notifications` | Recent notifications, paginated |
| `GET /social/notifications/unread-count` | The unread badge count |
| `POST /social/notifications/read` | Mark notifications read |

The unread badge is re-read from the server after a list loads rather than guessed locally, and a
failed badge poll is silent — the list itself reports errors.

## Realtime

The Server-Sent Events stream (`GET /social/stream`) pushes notifications, messages, typing
events, read receipts, and unread-count updates as they happen, so the bell updates without polling.

## Related

- [Feeds](/network/feeds/) — reading the posts that generate notifications
- [Direct Messages](/network/messages/) — new-message notifications
- [Communities](/network/communities/) — community notifications
- [Follows](/network/follows/) — follow notifications
