Skip to content
nsin docs

Unread counters for tickets and notifications

GET
/badges
curl --request GET \
--url https://api.nsin.ir/badges \
--header 'Authorization: Bearer <token>'

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.

Unread counters.

Media type application/json
object
tickets_unread

Open tickets with an unread reply from support.

integer
notifications_unread

Notifications in your feed not yet marked seen.

integer
Example
{
"tickets_unread": 1,
"notifications_unread": 4
}

Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}