Skip to content
nsin docs

Get the domain's custom pages

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

The pages a visitor sees when the edge itself answers instead of the origin: a block rule (blocked, 403), the WAF (waf, 403), a rate limit (rate_limit, 429) and the maintenance switch (maintenance, 503). A domain that never changed anything gets every page in mode nsin and maintenance off. Origin errors (5xx) are not here — those are error page rules. Requires domain.view.

domain
required
string

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

Example
example.com

The domain’s custom pages.

Media type application/json
object
blocked

One page the edge serves itself.

object
mode

nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.

string
default: nsin
Allowed values: nsin custom redirect
html

Your page, used in mode custom. At most 32 KiB, UTF-8.

string
url

Full http:// or https:// address, used in mode redirect. At most 2048 characters.

string
waf

One page the edge serves itself.

object
mode

nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.

string
default: nsin
Allowed values: nsin custom redirect
html

Your page, used in mode custom. At most 32 KiB, UTF-8.

string
url

Full http:// or https:// address, used in mode redirect. At most 2048 characters.

string
rate_limit

One page the edge serves itself.

object
mode

nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.

string
default: nsin
Allowed values: nsin custom redirect
html

Your page, used in mode custom. At most 32 KiB, UTF-8.

string
url

Full http:// or https:// address, used in mode redirect. At most 2048 characters.

string
maintenance
object
mode

nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.

string
default: nsin
Allowed values: nsin custom redirect
html

Your page, used in mode custom. At most 32 KiB, UTF-8.

string
url

Full http:// or https:// address, used in mode redirect. At most 2048 characters.

string
enabled

While true, the edge answers every request with 503 and the origin is not reached.

boolean
bypass_ips

Addresses that still reach the site during maintenance — single IPs, CIDR prefixes or low-high ranges.

Array<string>
<= 100 items
Example
{
"blocked": {
"mode": "nsin"
},
"waf": {
"mode": "nsin"
},
"rate_limit": {
"mode": "nsin"
},
"maintenance": {
"mode": "nsin"
}
}

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