Delete a user
deletehttps://api.nsin.ir/reseller/v1/users/{id}
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
Only possible while nothing is left behind the account: no live domain it owns or pays for, an empty wallet, and no person who has taken the login over. There is no cascade.
Path parameters
- idintegerrequiredpath
The id of one of your users.
Responses
200Deleted.
Content type: application/json
- statusstringOne of:
"deleted"
{
"status": "deleted"
}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.
{
"error": "invalid API key"
}403The key is read-only and this endpoint is a write. Read-only keys may
only issue GET, HEAD and OPTIONS.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}404No user with this id among yours.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "user not found"
}409Domains or money are left (domains and balance_rials say how
many and how much), or the person has taken over their login.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
- domainsinteger
- balance_rialsinteger (int64)
{
"error": "string",
"domains": 0,
"balance_rials": 0
}Example request
curl -X DELETE "https://api.nsin.ir/reseller/v1/users/0" \
-H "Authorization: Bearer $NSIN_API_KEY"