# GET /security/modsec/domains

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

UrbeStack release 0.2.35 API operation in the security group.

List domains and their effective ModSecurity modes

- Who may call it: administrator
- Token scope, any of: security, read, all
- Answers: 200 OK

Returns each domain's effective mode, any mode set specifically for the domain, who set it and when, and the domain owner's choice. Results are ordered by domain name and include the total number of matches, the server mode, and the number of domains in each effective mode.

Use limit to set the page size from 1 to 1000, with a default of 50. Use offset to skip domains. The API ignores values of q, limit, and offset that fail its format checks. The limit format allows 1 to 4 digits, and the offset format allows 1 to 9 digits.

## As a command

- [urbestack-modsec-domains](https://urbestack.com/docs/commands/urbestack-modsec-domains.md): Lists domains with their effective ModSecurity mode, the mode set for each domain and who set it and when, and its owner's choice.

## Parameters

- `q` (query, string): Partial domain or owner name. Use 1 to 253 characters drawn from word characters, periods, @, and hyphens.
- `customized` (query, boolean): Whether to return only domains with a domain-specific mode or an owner's choice.
- `limit` (query, integer, 1 to 1000)
- `offset` (query, integer, 0 or more)

## 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/security/modsec/domains?q=text&customized=1&limit=1&offset=1" \
  -H "Authorization: Bearer $TOKEN"
```

Response, 200 OK:

```
{
  "counts": {
    "customized": 1,
    "in_force": {
      "blocking": 1,
      "logging": 1,
      "off": 1
    },
    "lowered": 1,
    "own_mode": 1,
    "total": 1
  },
  "domains": [
    {
      "choice": {
        "at": "text",
        "mode": "off"
      },
      "disabled_rules": 1,
      "domain": "example.com",
      "in_force": "off",
      "own": {
        "at": "text",
        "by": "text",
        "mode": "off"
      },
      "owner": "text"
    }
  ],
  "limit": 1,
  "offset": 1,
  "server": {
    "by_hand": "off",
    "mode": "off"
  },
  "total": 1
}
```

## Errors

- 401: Authentication required
