Get the domain's effective plan entitlements
const url = 'https://api.nsin.ir/domains/example.com/features';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nsin.ir/domains/example.com/features \ --header 'Authorization: Bearer <token>'What this domain’s plan actually allows — the resolved values after any per-subscription overrides, so this is the authority on whether a feature is available.
A limit of null means unlimited. Use this before calling a gated
endpoint rather than inferring capability from the plan name. Readable
by shared members.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Effective entitlements.
The domain’s effective entitlements, after per-subscription overrides.
A null limit means unlimited.
object
The plan in force. Absent without an active plan.
Its display name.
Its stable identifier.
Whether the domain has an active (or grace) plan at all. Without one, plan-gated features answer 402.
Null means unlimited.
Null means unlimited.
Rules allowed per rule type. Null means unlimited.
Requests this domain’s gateway records may serve in a rolling 30-day window. Null means unlimited. See the gateway list endpoint for usage against it.
Egress, in GB, this domain’s gateway records may serve in a rolling 30-day window. Null means unlimited.
Ceiling for the domain’s cache_cap_mb — the largest response body cached.
Ceiling for the domain’s cache_l2_max_gb — the size of its cache pool.
Ceiling for the domain’s cache_l2_ttl_days — how long a cached entry may live.
Rule types this plan does not include, by rule type string (for
example origin_pool, origin_route, optimize). A DENY list: any
type not listed is available. A rule of a listed type can still be
created and edited, but it is saved switched off and cannot be
switched on; rules of a type the plan stops including are switched
off (not deleted) when the plan changes.
Gates the Gateways feature.
Gates the raw-log and top-N analytics endpoints.
Gates most analytics sections.
Whether the plan includes edge rules at all. When false, every rule type is locked the way disabled_rule_types describes.
Gates the cache purge endpoints.
Gates the domain’s bot cache (bot_cache_enabled on Domain).
Gates Email Routing (the /email-routing endpoints).
Custom email addresses this domain may hold. Null means unlimited.
Messages this domain may forward per UTC day. Null means unlimited. Past it, the mail hosts defer (SMTP 452) until the day rolls over.
Gates sending mail from the domain’s addresses (the email routing send endpoint).
Recipients this domain may send to per UTC day. Null means unlimited.
Custom (expression) firewall rules this domain may hold. Null means
unlimited, 0 that the plan has no custom rules. After a downgrade
the extra rules are kept, but no more can be created or switched
on. The current count is domain_usage[].custom_rule_count.
The domain may switch on Under Attack Mode (PUT /domains/{domain}/under-attack). On for every plan unless support switches it off.
Gates custom certificate upload.
WebSocket support.
Gates the Host-header override on records (host_header).
Whether uptime outage/recovery alerts may be delivered by SMS. When false they still go out by email and to the panel — uptime monitoring itself is not gated.
Direct support when true; ticket support when false.
Whether the plan includes the default NSIN Shield WAF rule (see GET /domains/{domain}/rules/waf/shield/status).
Requests the domain’s gateways served in the rolling 30-day window. Present when the plan includes gateways, or while the domain is blocked by the gateway quota.
Egress bytes of the gateways over the same window — a meter, not a separate charge.
The gateway allowance is spent; the gateway hostnames answer 429.
Which gateway allowance ran out.
When the gateway usage was last counted.
Current usage against the limits above.
object
Example
{ "gateway_quota_reason": "requests"}Missing domain.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}