Unread counters for tickets and notifications
gethttps://api.nsin.ir/badges
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Both of the panel's header badges in one request: open support
tickets whose latest message is an unread reply from support, and
unseen notifications. The numbers are exactly what
GET /tickets/unread-count and GET /notifications/unread-count
return — poll this one endpoint instead of both.
Responses
200Unread counters.
Content type: application/json
- tickets_unreadinteger
Open tickets with an unread reply from support.
- notifications_unreadinteger
Notifications in your feed not yet marked seen.
{
"tickets_unread": 1,
"notifications_unread": 4
}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.
{
"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.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/badges" \
-H "Authorization: Bearer $NSIN_API_KEY"