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

List pending invitations

gethttps://api.nsin.ir/domains/{domain}/invites

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

Invitations that have not yet been accepted. Invites addressed to someone who already has access are filtered out. Requires members.manage.

Path parameters

  • domainstringrequiredpath

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

Responses

200Pending invitations.

Content type: application/json

  • invitesarray of Invite
    Item fields
    • idinteger
    • domain_idinteger
    • emailstring

      The address the invitation is bound to.

    • rolestring

      A role that may be assigned to a member or invitation. owner is not grantable — it always follows domain ownership.

      One of: "admin" "editor" "viewer"
    • invited_byinteger

      User id of the inviter.

    • expires_atstring (date-time)
    • max_usesinteger
    • usesinteger
    • revoked_atstring (date-time)
    • created_atstring (date-time)
    • linkstring

      The accept URL. Returned when the invitation is created or resent.

    • is_linkboolean

      True for a shareable link rather than an emailed invitation.

    • exhaustedboolean

      True when uses has reached max_uses.

json
{
  "invites": [
    {
      "id": 0,
      "domain_id": 0,
      "email": "string",
      "role": "admin",
      "invited_by": 0,
      "expires_at": "2026-01-01T00:00:00Z",
      "max_uses": 0,
      "uses": 0,
      "revoked_at": "2026-01-01T00:00:00Z",
      "created_at": "2026-01-01T00:00:00Z",
      "link": "string",
      "is_link": true,
      "exhausted": 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"
}
403The key is read-only, your role on the domain lacks the required permission, or the domain's plan does not include the feature.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only 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/invites" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc