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

Remove a member

deletehttps://api.nsin.ir/domains/{domain}/members/{userId}

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

Revokes a member's access to the domain. Removing someone else requires members.manage; any member may remove themselves (leave the domain) with just domain.view. The owner cannot be removed. If the member was the domain's nominated payer, the nomination is cleared at the same time and both they and the owner are notified — the owner pays again.

Path parameters

  • domainstringrequiredpath

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

  • userIdintegerrequiredpath

    The member's user id, from the member list.

Responses

200Removed.

Content type: application/json

  • messagestring
json
{
  "message": "deleted"
}
400Invalid user id, or an attempt to remove the owner.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
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"
}
404Domain or member not found.

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 DELETE "https://api.nsin.ir/domains/example.com/members/0" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc