Choose who pays for a user's domains
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
reseller: your wallet (and credit line) pays for the user's domains
from now on. self: the user's own wallet pays; send them money with
the transfer endpoint. Charges already made stay where they were.
While you pay, the user and their domain's members can't buy plans, switch plans, change auto-renew or buy gateway packs: those are yours to do through the normal billing endpoints.
Path parameters
- idintegerrequiredpath
The id of one of your users.
Request body
Content type: application/json · required
- modestringrequiredOne of:
"reseller""self"
Responses
200The updated user.
Content type: application/json
- idinteger
- labelstring
- namestring | null
- contact_emailstring
- contact_phonestring
- invited_atstring | null (date-time)
When the last login invite was sent.
- login_acceptedboolean
The person accepted an invite and has their own login.
- billing_modestringOne of:
"reseller""self" - balance_rialsinteger (int64)
The user's own wallet.
- domainsinteger
- suspended_domainsinteger
Domains you suspended.
- created_atstring (date-time)
{
"id": 0,
"label": "string",
"name": "string",
"contact_email": "string",
"contact_phone": "string",
"invited_at": "2026-01-01T00:00:00Z",
"login_accepted": true,
"billing_mode": "reseller",
"balance_rials": 0,
"domains": 0,
"suspended_domains": 0,
"created_at": "2026-01-01T00:00:00Z"
}400mode is not reseller or self.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"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.
{
"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"
}Example request
curl -X PUT "https://api.nsin.ir/reseller/v1/users/0/billing" \
-H "Authorization: Bearer $NSIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "reseller"
}'