Skip to content
nsin docs

Get Under Attack Mode

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

Whether Under Attack Mode is on for the domain, since when, when it switches itself off, its bypass paths, and whether the domain’s plan includes it (allowed). Requires domain.view.

domain
required
string

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

Example
example.com

The domain’s Under Attack Mode state.

Media type application/json
object
enabled
boolean
bypass_paths

Paths never challenged. Kept while the mode is off, for next time.

Array<string>
since

When the mode was switched on. Null when off.

string | null format: date-time
until

When the mode switches itself off. Null when off or with no timer.

string | null format: date-time
allowed

The domain’s plan includes Under Attack Mode (under_attack_allowed).

boolean
Example generated
{
"enabled": true,
"bypass_paths": [
"example"
],
"since": "2026-04-15T12:00:00Z",
"until": "2026-04-15T12:00:00Z",
"allowed": true
}

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