Skip to content

Get the domain's current subscription

GET
/domains/{domain}/subscription
curl --request GET \
--url https://api.nsin.ir/domains/example.com/subscription \
--header 'Authorization: Bearer <token>'

The active subscription, its period statement, its invoices and the wallet movements tied to it. Returns null when the domain has no subscription. Readable by shared members, not only the owner.

domain
required
string

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

Example
example.com

Current subscription, or null.

Media type application/json
One of:
null
Example
{
"invoices": [
{
"kind": "subscription",
"status": "paid"
}
],
"transactions": [
{
"type": "topup"
}
]
}

Missing domain.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Example
{
"error": "read-only API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}