Skip to content
nsin docs

List the domain's subscription history

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

Every subscription the domain has had, newest first, with plan and term. Requires billing on the domain, or being its nominated payer; anyone else gets 404.

domain
required
string

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

Example
example.com

Subscriptions.

Media type application/json
Array<object>

A plan attached to one domain. Entitlements are not read from the plan directly — use GET /domains/{domain}/features, which resolves any per-subscription overrides.

object
id
integer
user_id
integer
domain_id
integer
domain_name
string
plan_id

The plan this subscription is on.

integer
plan

The plan this subscription is on.

object
key
additional properties
any
plan_term_id

The billing term purchased.

integer
plan_term

The billing term purchased.

object
key
additional properties
any
status

For example active, expired, grace or cancelled.

string
started_at

Start of the subscription term.

string format: date-time
expires_at

End of the paid term.

string format: date-time
grace_until

End of the grace period after expiry, during which the plan keeps working.

string format: date-time
auto_renew

Renew from the wallet at expiry.

boolean
quota_reset_days

Traffic-allowance reset cadence, frozen at purchase time so later plan changes cannot shift an existing subscriber’s quota window.

integer
is_trial

The free trial granted at signup. Downgrades to the free plan on expiry rather than entering grace.

boolean
cancelled_at

When the subscription was cancelled. Absent unless cancelled.

string format: date-time
cancel_reason

Why NSIN cancelled it, for a cancellation the system made. Absent otherwise.

string
Allowed values: domain_deleted recycled_domain_id plan_switch trial_ended
created_at
string format: date-time
updated_at
string format: date-time
effective_features

The entitlements this subscription carries — its plan with any overrides applied. On single-subscription reads.

object
key
additional properties
any
quota_period_start

Start of the current traffic-allowance window. On single-subscription reads of an active or grace subscription.

string format: date-time
quota_period_end

End of the current traffic-allowance window.

string format: date-time
quota_period_used_bytes

Traffic used so far in the current allowance window, in bytes. Only on GET /domains/{domain}/subscription.

integer format: int64
override_max_records

Support-set override of the plan’s max_records. Present only when set.

integer
override_max_traffic_gb

Support-set override of the plan’s max_traffic_gb. Present only when set.

integer
override_max_rules_per_set

Support-set override of the plan’s max_rules_per_set. Present only when set.

integer
override_max_gateway_requests_30d

Support-set override of the plan’s max_gateway_requests_30d. Present only when set.

integer
override_max_gateway_gb_30d

Support-set override of the plan’s max_gateway_gb_30d. Present only when set.

integer
override_max_cache_cap_mb

Support-set override of the plan’s max_cache_cap_mb. Present only when set.

integer
override_max_cache_disk_gb

Support-set override of the plan’s max_cache_disk_gb. Present only when set.

integer
override_max_cache_ttl_days

Support-set override of the plan’s max_cache_ttl_days. Present only when set.

integer
override_max_email_rules

Support-set override of the plan’s max_email_rules. Present only when set.

integer
override_max_email_forwards_per_day

Support-set override of the plan’s max_email_forwards_per_day. Present only when set.

integer
override_max_email_sends_per_day

Support-set override of the plan’s max_email_sends_per_day. Present only when set.

integer
override_max_custom_rules

Support-set override of the plan’s max_custom_rules. Present only when set.

integer
override_disabled_rule_types

Support-set override of the plan’s disabled_rule_types, as a JSON array in a string ([] lifts every restriction). Present only when set.

string
override_gateways_enabled

Support-set override of the plan’s gateways_enabled. Present only when set.

boolean
override_logs_enabled

Support-set override of the plan’s logs_enabled. Present only when set.

boolean
override_monitoring_enabled

Support-set override of the plan’s monitoring_enabled. Present only when set.

boolean
override_rules_enabled

Support-set override of the plan’s rules_enabled. Present only when set.

boolean
override_cache_purge_enabled

Support-set override of the plan’s cache_purge_enabled. Present only when set.

boolean
override_custom_ssl_enabled

Support-set override of the plan’s custom_ssl_enabled. Present only when set.

boolean
override_ws_enabled

Support-set override of the plan’s ws_enabled. Present only when set.

boolean
override_host_header_edit_enabled

Support-set override of the plan’s host_header_edit_enabled. Present only when set.

boolean
override_uptime_sms_enabled

Support-set override of the plan’s uptime_sms_enabled. Present only when set.

boolean
override_dedicated_support_enabled

Support-set override of the plan’s dedicated_support_enabled. Present only when set.

boolean
override_shield_enabled

Support-set override of the plan’s shield_enabled. Present only when set.

boolean
override_bot_cache_enabled

Support-set override of the plan’s bot_cache_enabled. Present only when set.

boolean
override_under_attack_allowed

Support-set override of the plan’s under_attack_allowed. Present only when set.

boolean
override_email_routing_enabled

Support-set override of the plan’s email_routing_enabled. Present only when set.

boolean
override_email_sending_enabled

Support-set override of the plan’s email_sending_enabled. Present only when set.

boolean
Example
[
{
"cancel_reason": "domain_deleted"
}
]

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