Skip to content

List domains

GET
/domains/
curl --request GET \
--url https://api.nsin.ir/domains/ \
--header 'Authorization: Bearer <token>'

Every domain you can access — owned and shared with you — each with a short SSL summary, its active subscription and your role on it.

Domain list.

Media type application/json
Array
object
id
integer
name
string
status
  • pending — managed domain waiting for its nameservers to point at NSIN.
  • unverified — external-DNS domain waiting for its TXT verification record.
  • active — serving.
  • moved — delegation has left NSIN; the domain keeps serving during a grace window.
  • disabled — not serving; re-enable with POST /domains/{domain}/enable.
  • banned — administratively blocked.
string
Allowed values: pending unverified active moved disabled banned
dns_mode

managed — NSIN hosts the DNS zone. external — you host DNS elsewhere and prove ownership with a TXT record.

string
Allowed values: managed external
user_id

Id of the owning user.

integer
verification_started_at
string format: date-time
cache_l2_max_gb

Per-domain cap on disk (L2) cache size, in GB.

integer
cache_l2_ttl_days

How long a disk-cache entry may live, in days. Maximum 7.

integer
>= 1 <= 7
cache_cap_mb

Largest response body NSIN will buffer and cache, in MB. Bigger responses stream straight from origin and are never cached. The selectable ceiling depends on the domain’s plan.

integer
Allowed values: 128 256 512 2048 4096
developer_mode_until

While set and in the future, the edge bypasses cache reads and writes for this domain. Absent when developer mode is off.

string format: date-time
pending_since
string format: date-time
moved_since
string format: date-time
next_check_at

When the background nameserver checker will next look at this domain.

string format: date-time
last_manual_ns_check_at

Last user-triggered nameserver check; these are limited to one per hour.

string format: date-time
sec_no_sniff

Send X-Content-Type-Options: nosniff. Off by default — it can break an origin that mislabels asset MIME types.

boolean
sec_referrer_policy

Send Referrer-Policy: strict-origin-when-cross-origin.

boolean
sec_strip_headers

Strip origin fingerprint headers from responses.

boolean
markdown_for_agents

Serve a Markdown rendering of eligible HTML pages to clients sending Accept: text/markdown. Requires an active plan.

boolean
outage_alerts

Notify the owner when a subdomain suffers a sustained origin outage.

boolean
uptime_threshold_pct

Per-minute origin-error percentage that counts as “down”.

integer
>= 50 <= 100
uptime_window_min

Minutes the domain must stay down before an incident opens.

integer
>= 2 <= 60
uptime_min_requests

Minimum origin-eligible requests in the window — the traffic floor below which no incident opens.

integer
uptime_min_active_min

Minimum populated one-minute buckets required in the window.

integer
uptime_recover_min

Consecutive clear minutes before an incident resolves.

integer
suspended

Paused for billing. The edge refuses the domain’s TLS handshake, so visitors get a connection error. Clears automatically once the wallet is no longer negative.

boolean
suspended_at
string format: date-time
created_at
string format: date-time
updated_at
string format: date-time
ssl
object
status
string
expires_at
string format: date-time
days_remaining
integer
subscription

The domain’s active subscription, when it has one.

object
key
additional properties
any
verification

The TXT record to publish to prove ownership of an external-DNS domain.

object
host

Name to create the TXT record at.

string
type
string
Allowed value: TXT
value

Exact TXT value to publish.

string
verified
boolean
expires_at
string format: date-time
seconds_remaining
integer
my_role

Your role on a domain. owner is implicit for the domain’s creator and for global admins; the other three are grantable via sharing.

string
Allowed values: owner admin editor viewer
Example
[
{
"name": "example.com",
"status": "pending",
"dns_mode": "managed",
"cache_cap_mb": 128,
"ssl": {
"status": "active"
},
"verification": {
"type": "TXT"
},
"my_role": "owner"
}
]

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

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