Skip to content

Get a site's firewall

GET /v1/sites/{siteId}/firewall

Returns the site's firewall: its mode, sensitivity and login protection, whether its settings are in place on the server (status), and its allowed and blocked addresses and exceptions (rules).

On a server with Imunify360 on (the server's security.status), the web application firewall's rules are Imunify360's, in place of Rabbitflare's own for every site there. mode still decides whether the site's requests are checked and whether attacks are blocked; sensitivity has no effect until Imunify360 is off. Allowed and blocked addresses and login protection keep working, but an address the server's own lists block (servers.security.addresses.list) is blocked for every site, whatever this list allows. Exceptions still turn rules off for the site's pages, by the numbers sites.firewall.events.list shows (Imunify360's there); servers.security.rules.disable turns a rule off for whole sites. The events keep listing the site's blocked and flagged requests; servers.security.incidents.get has the server's wider view (its address lists, denial of service, bots, WordPress).

Scopes

The token needs this scope. Without it, the request is refused with insufficient_scope (see Scopes).

sites:read
View sites. See sites and their domains, CDN, firewall, malware protection, backups, staging, resources, SMTP and Media Offload. SMTP includes who each site's recent emails went to, their subjects, and the team's sign-in addresses.

Path parameters

FieldType and description
siteId Required

string

The site's id.

Example request

curl "https://api.rabbitflare.com/v1/sites/8a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d/firewall" \
  -H "Authorization: Bearer $RABBITFLARE_TOKEN"

Response

200 OK Returns the SiteFirewall object in data.

The SiteFirewall object's fields 14 fields
FieldType and description
mode

string

protect: attacks are blocked before WordPress sees them (new sites start so). monitor: every request is checked and attacks are logged, but nothing is blocked. off: requests reach WordPress unchecked (blocked addresses are still refused).

Known values: offmonitorprotect More can appear.

sensitivity

string

standard (recommended): stops known attacks with very few false alarms. strict: catches subtler attacks too, but may flag some plugins (add exceptions if it does).

Known values: standardstrict More can appear.

loginProtection

boolean

Whether repeated sign-ins from one address are slowed down (after a few quick tries, one every 6 seconds), so password-guessing bots can't hammer wp-login.php. It works while the firewall is on.

status

string

Whether the settings are in place on the site's server: off, installing (the firewall is being set up on the server first, a few minutes), applying (the latest settings are on their way, usually seconds), active, or failed (see lastError; apply them again with POST /sites/{siteId}/firewall/actions/apply).

Known values: offinstallingapplyingactivefailed More can appear.

lastError

string or null

Why the settings couldn't be put in place (with status: "failed"). Null otherwise.

updatedAt

string or null An ISO 8601 time, in UTC

When the settings or rules last changed. Null when they never did.

rules

array of objects

The site's allowed addresses (up to 100), blocked addresses (up to 500) and exceptions (up to 30), oldest first.

id

string

The rule's id.

kind

string

allow: requests from address skip the firewall's checks. block: requests from address are refused on every page of the site. exception: the rules in ruleIds stop checking requests (on path and the pages under it, or everywhere when path is null).

Known values: allowblockexception More can appear.

address

string or null

The IP address or range, like 203.0.113.7 or 203.0.113.0/24, written as the firewall uses it (a range from its first address). Null for an exception.

ruleIds

array of integers

The firewall rules an exception turns off, by number (as an event's matchedRules names them). Empty for an address.

path

string or null

Where an exception applies: this page and the pages under it (/ is the front page only). Null: everywhere on the site, and always for an address.

note

string or null

The note given when it was added. Null when none was.

createdAt

string An ISO 8601 time, in UTC

When the rule was added.

Example response

200 OK
{
  "data": {
    "mode": "protect",
    "sensitivity": "standard",
    "loginProtection": true,
    "status": "active",
    "lastError": null,
    "updatedAt": "2026-11-18T09:31:17.000Z",
    "rules": [
      {
        "id": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
        "kind": "block",
        "address": "198.51.100.0/24",
        "ruleIds": [],
        "path": null,
        "note": "Login attempts from a scanner",
        "createdAt": "2026-11-18T09:20:03.000Z"
      },
      {
        "id": "f2a3b4c5-d6e7-4f8a-9b0c-1d2e3f4a5b6c",
        "kind": "exception",
        "address": null,
        "ruleIds": [
          942270,
          942360
        ],
        "path": "/wp-admin/admin-ajax.php",
        "note": "Page builder saves",
        "createdAt": "2026-11-18T09:31:17.000Z"
      }
    ]
  }
}

Errors

The errors this request can answer besides those every request can (a missing token, a missing scope, the rate limits). Each answer is an Error object (see Errors).

Status and codeWhen, and what to do
403 feature_unavailable

This product isn't open to the account.

Contact support if you'd like it opened.

404 not_found

The resource doesn't exist, or isn't this account's.

Check the id. Ids of other accounts' resources answer the same way.

Rate limit

Read requests: 120 a minute per token, 240 per account. More in Rate limits.

Added on .

Popular

API docs