Unread counters for tickets and notifications
const url = 'https://api.nsin.ir/badges';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Unread counters.
object
Open tickets with an unread reply from support.
Notifications in your feed not yet marked seen.
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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}