API operation · domains group
GET
/domains/{name}/modsec
First published 19 Nov 2026
0.2.30Unchanged since publicationGet a domain's ModSecurity modes
Who may call it
AdministratorResellerCustomer
Token scope, any of
domainsreadallAnswers200 OK
Returns the server mode, the administrator's mode for the domain, the domain owner's choice, and the effective mode. The administrator's mode can raise or lower the server mode for the domain. If the owner has a choice, the weaker of that choice and the administrator's mode takes effect. Otherwise, the administrator's mode applies.
The response also shows the strongest mode the owner can choose and whether the owner's choice can affect the domain. The owner can choose a mode only while the administrator's mode for the domain is logging or blocking.
The domain's owner, the reseller who manages the owner, and administrators can view these settings.
As a command
Run as root on the serverParameters
namepath ·DomainNameRequiredExample
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X GET "$API/domains/example.com/modsec" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"allowed": "off",
"choice": {
"at": "text",
"mode": "off"
},
"customized": true,
"disabled_rules": {
"by_owner": 1,
"max": 1,
"total": 1
},
"domain": "example.com",
"in_force": "off",
"locked": true,
"managed": true,
"own": {
"at": "text",
"by": "text",
"mode": "off"
},
"owner": "text",
"server": {
"by_hand": "off",
"mode": "off"
}
}Errors
5 errors, each a status and a sentence400Domain name required400Domain name too long400Invalid domain name401Authentication required404Domain '<name>' not foundNo error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.2.30 on 19 Nov 2026.
urbestack.com/docs/api/get-domains-name-modsec/