nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Notifications

Count unseen notifications

gethttps://api.nsin.ir/notifications/unread-count

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

How many notifications in your feed you have not marked seen — the number behind the panel's notification badge. GET /badges returns it together with the unread ticket count.

Responses

200Unread count.

Content type: application/json

  • countinteger
json
{
  "count": 0
}
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/notifications/unread-count" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc