> ## Documentation Index
> Fetch the complete documentation index at: https://handbook.nyotaimara.com/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /v1/notifications — Fetch In-App Notifications

> Retrieve the authenticated user's 50 most recent in-app notifications ordered newest first, plus an unreadCount integer for badge display in your UI.

Retrieve the latest 50 in-app notifications for the authenticated user, ordered by creation time descending. The response also includes an `unreadCount` integer suitable for driving notification badge indicators in your UI.

## Endpoint

```
GET /v1/notifications
```

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token. Format: `Bearer <token>`
</ParamField>

## Response

<ResponseField name="success" type="boolean">
  `true` on a successful request.
</ResponseField>

<ResponseField name="data" type="object">
  Notification payload.

  <Expandable title="properties">
    <ResponseField name="notifications" type="object[]">
      Array of up to 50 notification objects, newest first.

      <Expandable title="properties">
        <ResponseField name="id" type="string">
          Unique notification ID.
        </ResponseField>

        <ResponseField name="title" type="string">
          Short notification title.
        </ResponseField>

        <ResponseField name="message" type="string">
          Full notification body text.
        </ResponseField>

        <ResponseField name="type" type="string">
          Severity level. One of `info`, `warning`, `success`, or `error`.
        </ResponseField>

        <ResponseField name="isRead" type="boolean">
          `true` if the user has already read this notification.
        </ResponseField>

        <ResponseField name="createdAt" type="string">
          ISO 8601 timestamp of when the notification was created.
        </ResponseField>

        <ResponseField name="actionUrl" type="string">
          Optional deep-link URL for the notification action. May be `null`.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="unreadCount" type="number">
      Number of unread notifications in the returned set.
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

```bash theme={null}
curl --request GET \
  --url https://api.nyotaimara.com/v1/notifications \
  --header 'Authorization: Bearer <token>'
```

```json theme={null}
{
  "success": true,
  "data": {
    "notifications": [
      {
        "id": "ntf_01j9...",
        "title": "Order Delivered",
        "message": "Order #ord_01j9 has been delivered to the customer.",
        "type": "success",
        "isRead": false,
        "createdAt": "2025-04-26T14:30:00.000Z",
        "actionUrl": "/commerce/orders/ord_01j9..."
      },
      {
        "id": "ntf_01j8...",
        "title": "Low Inventory Warning",
        "message": "Product SKU-42 has only 3 units remaining at Warehouse A.",
        "type": "warning",
        "isRead": true,
        "createdAt": "2025-04-25T09:00:00.000Z",
        "actionUrl": null
      }
    ],
    "unreadCount": 3
  }
}
```
