# listNotifications

List your in-app notifications (the bell feed), newest first. Optional filters: notificationTypeFilter (one notification type: use an EXACT value from getAvailableNotificationTypes; an unrecognized string is not an error, it just returns an empty feed with total 0), seen (true = only read, false = only unread, omitted = both), and searchTerm. Cursor-paginated: pass the returned canFetchNext as a signal there is another page and re-call with cursor set to the last notification's id (limit defaults to 25, capped at 50). total is the full match count and hasUnread flags any unread in the feed, so nothing is silently truncated. Reads ONLY your own notifications: true for EVERY key including an admin's, because this operation exposes no recipient selector at all. The app does have the admin/Goliath-staff teammate feed (one or more teammates' notifications combined), so if the user asks to see a colleague's bell, point them at the app instead of saying nobody can see it. Each row carries the related-record ids (contactId, dealId, noteId, replyId, taskId, callId) and actionType/actionTargetId for deep-linking.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "listNotifications", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no
- Result cap: `limit` is clamped to 50, without an error

## Variables

- `limit`: `Int` (default `25`)
- `cursor`: `String`
- `notificationTypeFilter`: `String`
- `seen`: `Boolean`
- `searchTerm`: `String`

## Response (data, an example)

```json
{
  "notificationQuery": {
    "paginateUserNotifications": {
      "notifications": [
        {
          "id": "<ID>",
          "userId": "<ID>",
          "notificationType": "…",
          "title": "…",
          "content": "…",
          "seen": true,
          "createdAt": "…",
          "actionType": "…",
          "actionTargetId": "<ID>",
          "contactId": "<ID>",
          "dealId": "<ID>",
          "noteId": "<ID>",
          "replyId": "<ID>",
          "taskId": "<ID>",
          "callId": "<ID>"
        }
      ],
      "total": 0,
      "hasUnread": true,
      "canFetchNext": true,
      "canFetchPrevious": true
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listNotifications",
    "variables": {}
  }'
```
