# social.grain.unspecced.getNotifications

> Get notifications for the authenticated user.

- Kind: query
- Authority: unspecced.grain.social
- Lexicon: 1
- Published by [grain.social](https://lexicon.garden/identity/did:plc:e7rftrdyz5e2rw4y6ocszew2), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getNotifications)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getNotifications/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:e7rftrdyz5e2rw4y6ocszew2/social.grain.unspecced.getNotifications/analytics)

## Query (`social.grain.unspecced.getNotifications`)

Type: query · GET

### Parameters (query string)

- `countOnly` (boolean): If true, only return unseenCount without hydrating notifications.
- `cursor` (string)
- `limit` (integer)
  - Constraints: minimum: 1, maximum: 100, default: 20

### Output (application/json)

- `cursor` (string)
- `notifications` (array, required)
  - `items` (ref)
    - Reference: `#notificationItem`
- `unseenCount` (integer)

## #notificationItem (`social.grain.unspecced.getNotifications#notificationItem`)

Type: object

### Properties

- `author` (ref, required)
  - Reference: `social.grain.actor.defs#profileView`
- `commentText` (string)
- `createdAt` (string · datetime, required)
- `galleryThumb` (string)
- `galleryTitle` (string)
- `galleryUri` (string · at-uri)
- `reason` (string, required)
  - Constraints: knownValues: gallery-favorite | gallery-comment | gallery-comment-mention | gallery-mention | comment-favorite | story-favorite | story-comment | reply | follow
- `replyToText` (string)
- `storyThumb` (string)
- `storyUri` (string · at-uri)
- `uri` (string · at-uri, required)

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get notifications for the authenticated user.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "notifications": {
              "items": {
                "ref": "#notificationItem",
                "type": "ref"
              },
              "type": "array"
            },
            "unseenCount": {
              "type": "integer"
            }
          },
          "required": [
            "notifications"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "countOnly": {
            "description": "If true, only return unseenCount without hydrating notifications.",
            "type": "boolean"
          },
          "cursor": {
            "type": "string"
          },
          "limit": {
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "params"
      },
      "type": "query"
    },
    "notificationItem": {
      "properties": {
        "author": {
          "ref": "social.grain.actor.defs#profileView",
          "type": "ref"
        },
        "commentText": {
          "type": "string"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "galleryThumb": {
          "type": "string"
        },
        "galleryTitle": {
          "type": "string"
        },
        "galleryUri": {
          "format": "at-uri",
          "type": "string"
        },
        "reason": {
          "knownValues": [
            "gallery-favorite",
            "gallery-comment",
            "gallery-comment-mention",
            "gallery-mention",
            "comment-favorite",
            "story-favorite",
            "story-comment",
            "reply",
            "follow"
          ],
          "type": "string"
        },
        "replyToText": {
          "type": "string"
        },
        "storyThumb": {
          "type": "string"
        },
        "storyUri": {
          "format": "at-uri",
          "type": "string"
        },
        "uri": {
          "format": "at-uri",
          "type": "string"
        }
      },
      "required": [
        "uri",
        "reason",
        "createdAt",
        "author"
      ],
      "type": "object"
    }
  },
  "id": "social.grain.unspecced.getNotifications",
  "lexicon": 1
}
```
