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

Create a user

posthttps://api.nsin.ir/reseller/v1/users

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

Creates an account you manage. It has no email, phone or password of its own: the contact you give is stored for a later login invite and only becomes the account's login when the person accepts that invite. So a create never fails, and tells you nothing, because an address already belongs to another NSIN account.

New users start with billing mode reseller (you pay).

Request body

Content type: application/json · required

  • labelstring

    Your own name for the account. Only you see it.

  • namestring

    The person's name.

  • contact_emailstring (email)

    Where a login invite can go. Not the account's login until accepted.

  • contact_phonestring

    Where an SMS invite can go (Iranian mobile).

Responses

201The new 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_modestring
    One of: "reseller" "self"
  • balance_rialsinteger (int64)

    The user's own wallet.

  • domainsinteger
  • suspended_domainsinteger

    Domains you suspended.

  • created_atstring (date-time)
json
{
  "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"
}
400Neither label nor name was given, or a field is too long or not a valid email or phone.

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 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.

json
{
  "error": "read-only API key"
}
409You have reached your limit of users. NSIN support can raise it.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}

Example request

bash
curl -X POST "https://api.nsin.ir/reseller/v1/users" \
  -H "Authorization: Bearer $NSIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "label": "Shop Arya",
  "name": "Ali Rezaei",
  "contact_email": "ali@example.com"
}'
esc