Get the domain's custom pages
const url = 'https://api.nsin.ir/domains/example.com/custom-pages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”The domain’s custom pages.
object
One page the edge serves itself.
object
nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.
Your page, used in mode custom. At most 32 KiB, UTF-8.
Full http:// or https:// address, used in mode redirect. At most 2048 characters.
One page the edge serves itself.
object
nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.
Your page, used in mode custom. At most 32 KiB, UTF-8.
Full http:// or https:// address, used in mode redirect. At most 2048 characters.
One page the edge serves itself.
object
nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.
Your page, used in mode custom. At most 32 KiB, UTF-8.
Full http:// or https:// address, used in mode redirect. At most 2048 characters.
object
nsin — the branded NSIN page; custom — the HTML in html; redirect — a 302 to url.
Your page, used in mode custom. At most 32 KiB, UTF-8.
Full http:// or https:// address, used in mode redirect. At most 2048 characters.
While true, the edge answers every request with 503 and the origin is not reached.
Addresses that still reach the site during maintenance — single IPs, CIDR prefixes or low-high ranges.
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.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "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.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}