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

Notification categories, channels and role defaults

gethttps://api.nsin.ir/domains/{domain}/members/notify-catalog

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

The vocabulary behind a member's notify matrix: every category, every outbound channel, and what each grantable role receives when the member has made no explicit choice. Read it instead of hard-coding those lists, so a category added later shows up on its own. Requires domain.view.

The in-app feed is not a channel and cannot be switched off (in_app_always_on is always true): the notification row is both the feed and the de-duplication key, so suppressing it would make the same event re-send on every tick forever.

Path parameters

  • domainstringrequiredpath

    The domain name (for example example.com) — not a numeric id.

Responses

200The catalog.

Content type: application/json

  • categoriesarray of string
  • channelsarray of string
  • role_defaultsobject

    Grantable role → category → whether a member holding that role receives the category when they have chosen nothing. The default applies to every channel.

  • in_app_always_onboolean

    Always true. The in-app feed cannot be switched off — say so in your UI, or the first question will be why muted notifications still appear.

json
{
  "categories": [
    "domain"
  ],
  "channels": [
    "email"
  ],
  "role_defaults": {},
  "in_app_always_on": true
}
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"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only 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/domains/example.com/members/notify-catalog" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc