Skip to main content
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

Authorization
string
required
Bearer token. Format: Bearer <token>

Response

success
boolean
true on a successful request.
data
object
Notification payload.

Example

curl --request GET \
  --url https://api.nyotaimara.com/v1/notifications \
  --header 'Authorization: Bearer <token>'
{
  "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
  }
}