Get the domain's custom pages
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
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.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Responses
200The domain's custom pages.
Content type: application/json
- blockedCustomPage
One page the edge serves itself.
Fields
- modestring
nsin— the branded NSIN page;custom— the HTML inhtml;redirect— a 302 tourl.One of:"nsin""custom""redirect"Default:"nsin" - htmlstring
Your page, used in mode
custom. At most 32 KiB, UTF-8. - urlstring
Full
http://orhttps://address, used in moderedirect. At most 2048 characters.
- wafCustomPage
One page the edge serves itself.
Fields
- modestring
nsin— the branded NSIN page;custom— the HTML inhtml;redirect— a 302 tourl.One of:"nsin""custom""redirect"Default:"nsin" - htmlstring
Your page, used in mode
custom. At most 32 KiB, UTF-8. - urlstring
Full
http://orhttps://address, used in moderedirect. At most 2048 characters.
- rate_limitCustomPage
One page the edge serves itself.
Fields
- modestring
nsin— the branded NSIN page;custom— the HTML inhtml;redirect— a 302 tourl.One of:"nsin""custom""redirect"Default:"nsin" - htmlstring
Your page, used in mode
custom. At most 32 KiB, UTF-8. - urlstring
Full
http://orhttps://address, used in moderedirect. At most 2048 characters.
- maintenanceobject
One page the edge serves itself.
Fields
- modestring
nsin— the branded NSIN page;custom— the HTML inhtml;redirect— a 302 tourl.One of:"nsin""custom""redirect"Default:"nsin" - htmlstring
Your page, used in mode
custom. At most 32 KiB, UTF-8. - urlstring
Full
http://orhttps://address, used in moderedirect. At most 2048 characters. - enabledboolean
While true, the edge answers every request with 503 and the origin is not reached.
- bypass_ipsarray of string
Addresses that still reach the site during maintenance — single IPs, CIDR prefixes or
low-highranges.
{
"blocked": {
"mode": "nsin",
"html": "string",
"url": "string"
},
"waf": {
"mode": "nsin",
"html": "string",
"url": "string"
},
"rate_limit": {
"mode": "nsin",
"html": "string",
"url": "string"
},
"maintenance": {
"mode": "nsin",
"html": "string",
"url": "string",
"enabled": true,
"bypass_ips": [
"string"
]
}
}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.
{
"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.
{
"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.
{
"error": "rate limit exceeded"
}Example request
curl -X GET "https://api.nsin.ir/domains/example.com/custom-pages" \
-H "Authorization: Bearer $NSIN_API_KEY"