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

Get the domain's effective plan entitlements

gethttps://api.nsin.ir/domains/{domain}/features

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

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.

Path parameters

  • domainstringrequiredpath

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

Responses

200Effective entitlements.

Content type: application/json

  • plan_idinteger

    The plan in force. Absent without an active plan.

  • plan_namestring

    Its display name.

  • plan_slugstring

    Its stable identifier.

  • has_active_planboolean

    Whether the domain has an active (or grace) plan at all. Without one, plan-gated features answer 402.

  • max_recordsinteger

    Null means unlimited.

  • max_traffic_gbinteger

    Null means unlimited.

  • max_rules_per_setinteger

    Rules allowed per rule type. Null means unlimited.

  • max_gateway_requests_30dinteger | null

    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.

  • max_gateway_gb_30dinteger | null

    Egress, in GB, this domain's gateway records may serve in a rolling 30-day window. Null means unlimited.

  • max_cache_cap_mbinteger

    Ceiling for the domain's cache_cap_mb — the largest response body cached.

  • max_cache_disk_gbinteger

    Ceiling for the domain's cache_l2_max_gb — the size of its cache pool.

  • max_cache_ttl_daysinteger

    Ceiling for the domain's cache_l2_ttl_days — how long a cached entry may live.

  • disabled_rule_typesarray of string

    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.

  • gateways_enabledboolean

    Gates the Gateways feature.

  • logs_enabledboolean

    Gates the raw-log and top-N analytics endpoints.

  • monitoring_enabledboolean

    Gates most analytics sections.

  • rules_enabledboolean

    Whether the plan includes edge rules at all. When false, every rule type is locked the way disabled_rule_types describes.

  • cache_purge_enabledboolean

    Gates the cache purge endpoints.

  • bot_cache_enabledboolean

    Gates the domain's bot cache (bot_cache_enabled on Domain).

  • email_routing_enabledboolean

    Gates Email Routing (the /email-routing endpoints).

  • max_email_rulesinteger | null

    Custom email addresses this domain may hold. Null means unlimited.

  • max_email_forwards_per_dayinteger | null

    Messages this domain may forward per UTC day. Null means unlimited. Past it, the mail hosts defer (SMTP 452) until the day rolls over.

  • email_sending_enabledboolean

    Gates sending mail from the domain's addresses (the email routing send endpoint).

  • max_email_sends_per_dayinteger | null

    Recipients this domain may send to per UTC day. Null means unlimited.

  • max_custom_rulesinteger | null

    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.

  • under_attack_allowedboolean

    The domain may switch on Under Attack Mode (PUT /domains/{domain}/under-attack). On for every plan unless support switches it off.

  • custom_ssl_enabledboolean

    Gates custom certificate upload.

  • ws_enabledboolean

    WebSocket support.

  • host_header_edit_enabledboolean

    Gates the Host-header override on records (host_header).

  • uptime_sms_enabledboolean

    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.

  • dedicated_support_enabledboolean

    Direct support when true; ticket support when false.

  • shield_enabledboolean

    Whether the plan includes the default NSIN Shield WAF rule (see GET /domains/{domain}/rules/waf/shield/status).

  • gateway_requests_30dinteger (int64)

    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.

  • gateway_bytes_30dinteger (int64)

    Egress bytes of the gateways over the same window — a meter, not a separate charge.

  • gateway_quota_exceededboolean

    The gateway allowance is spent; the gateway hostnames answer 429.

  • gateway_quota_reasonstring

    Which gateway allowance ran out.

    One of: "requests" "bytes"
  • gateway_quota_counted_atstring (date-time)

    When the gateway usage was last counted.

  • domain_usagearray of object

    Current usage against the limits above.

  • plan_term_idinteger
  • billing_duration_daysinteger
  • quota_reset_daysinteger
  • quota_period_startstring (date-time)
  • quota_period_endstring (date-time)
json
{
  "plan_id": 0,
  "plan_name": "string",
  "plan_slug": "string",
  "has_active_plan": true,
  "max_records": 0,
  "max_traffic_gb": 0,
  "max_rules_per_set": 0,
  "max_gateway_requests_30d": 0,
  "max_gateway_gb_30d": 0,
  "max_cache_cap_mb": 0,
  "max_cache_disk_gb": 0,
  "max_cache_ttl_days": 0,
  "disabled_rule_types": [
    "string"
  ],
  "gateways_enabled": true,
  "logs_enabled": true,
  "monitoring_enabled": true,
  "rules_enabled": true,
  "cache_purge_enabled": true,
  "bot_cache_enabled": true,
  "email_routing_enabled": true,
  "max_email_rules": 0,
  "max_email_forwards_per_day": 0,
  "email_sending_enabled": true,
  "max_email_sends_per_day": 0,
  "max_custom_rules": 0,
  "under_attack_allowed": true,
  "custom_ssl_enabled": true,
  "ws_enabled": true,
  "host_header_edit_enabled": true,
  "uptime_sms_enabled": true,
  "dedicated_support_enabled": true,
  "shield_enabled": true,
  "gateway_requests_30d": 0,
  "gateway_bytes_30d": 0,
  "gateway_quota_exceeded": true,
  "gateway_quota_reason": "requests",
  "gateway_quota_counted_at": "2026-01-01T00:00:00Z",
  "domain_usage": [
    {}
  ],
  "plan_term_id": 0,
  "billing_duration_days": 0,
  "quota_reset_days": 0,
  "quota_period_start": "2026-01-01T00:00:00Z",
  "quota_period_end": "2026-01-01T00:00:00Z"
}
400Missing domain.

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"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X GET "https://api.nsin.ir/domains/example.com/features" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc