Skip to content
nsin docs

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 domain’s current subscription itself, with its entitlements (effective_features), the current traffic-allowance window and the traffic used in it (quota_period_used_bytes). null when the domain has no subscription. Readable by every member of the domain, not only those with billing. For its statement, invoices and wallet movements use GET /domains/{domain}/subscriptions/{id}.

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
{
"cancel_reason": "domain_deleted"
}

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. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

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"
}