# GET /domains/{name}/modsec

First published 19 Nov 2026 (release 0.2.30) · Unchanged since publication

UrbeStack release 0.2.35 API operation in the domains group.

Get a domain's ModSecurity modes

- Who may call it: administrator, reseller, customer
- Token scope, any of: domains, read, all
- Answers: 200 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

- [urbestack-domain-modsec-show](https://urbestack.com/docs/commands/urbestack-domain-modsec-show.md): Shows the server's ModSecurity mode, the administrator's mode for the domain, the owner's choice and the mode in force.

## Parameters

- `name` (path, DomainName, required)

## Example

Set $API to the base URL and $TOKEN to the token, as the [API overview](https://urbestack.com/docs/api.md) shows.

```
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

- 400: Domain name required
- 400: Domain name too long
- 400: Invalid domain name
- 401: Authentication required
- 404: Domain '<name>' not found
