List rules for an organization using the unified query-parameter pattern shared by skins, skin-templates, and skills. This is equivalent to `GET /v1/organizations/{org_id}/rules` but takes `organization_id` as a query parameter instead of a path segment. Platform-scoped rules are always included unless you explicitly filter to a non-platform scope.

## Query parameters

**`organization_id`** string required

Organization ID (`org_` prefixed).

**`skip`** integer optional · Defaults to `0`

Number of records to skip for pagination.

**`limit`** integer optional · Defaults to `100`

Maximum number of records to return. Range: 1–100.

**`search`** string optional

Search text matched against rule name, description, and content.

**`category`** string optional

Filter by category. Values: `safety`, `professional`, `creative`, `technical`, `custom`, `viz_hints`.

**`rule_type`** string optional

Filter by rule type. Values: `behavior`, `guardrails`, `formatting`, `context`, `content_policy`, `constraint`.

**`scope`** string optional

Filter by scope. Values: `platform`, `global`, `organization`, `model`, `assistant`, `user`, `vector_store`.

**`is_active`** boolean optional

Filter by active status (`true` or `false`).

**`is_public`** boolean optional

Filter by public status (`true` or `false`).

**`entity_type`** string optional

Filter by entity type. Values: `assistant`, `user`, `model`, `vector_store`, `organization`.

**`entity_id`** string optional

Filter by a specific entity ID. Requires `entity_type` to be set.

**`attached_only`** boolean optional

Filter by attachment status. `true`: only attached rules, `false`: only unattached rules.

**`include_attachments`** boolean optional · Defaults to `false`

Include the list of attached entities for each rule in the response.

## Returns

Returns a paginated list of rule summaries (each with a content preview), plus `total`, `skip`, `limit`, and the applied `filters`.

Request

```bash cURL
curl "https://api.aitronos.com/v1/rules?organization_id=org_abc123&category=safety&limit=20" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```


```python Python SDK
from aitronos import Aitronos

client = Aitronos(api_key="your-api-key")
result = client.rules.list_rules(
    "org_abc123",
    category="safety",
    limit=20,
)
print(result.total)
```


```python Python
import os, requests

response = requests.get(
    "https://api.aitronos.com/v1/rules",
    headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"},
    params={"organization_id": "org_abc123", "category": "safety", "limit": 20},
)
print(response.json())
```


```javascript JavaScript
const params = new URLSearchParams({
  organization_id: "org_abc123",
  category: "safety",
  limit: "20",
});
const response = await fetch(`https://api.aitronos.com/v1/rules?${params}`, {
  headers: { Authorization: `Bearer ${process.env.ACCESS_TOKEN}` },
});
console.log(await response.json());
```

Response

```json 200 OK
{
  "rules": [
    {
      "id": "rule_abc123",
      "name": "Safety Guidelines",
      "description": "Never share customer personal information.",
      "content_length": 412,
      "category": "safety",
      "rule_type": "content_policy",
      "scope": "organization",
      "apply_mode": "always",
      "organization_id": "org_abc123",
      "created_by": "usr_abc",
      "is_public": false,
      "is_active": true,
      "version": 2,
      "usage_count": 3,
      "can_edit": true,
      "my_access_level": "modify",
      "created_at": "2026-04-15T10:00:00Z",
      "updated_at": "2026-04-15T11:00:00Z",
      "content_preview": "Never share customer personal information..."
    }
  ],
  "total": 1,
  "skip": 0,
  "limit": 20,
  "filters": { "category": "safety" }
}
```


```json 403 Forbidden
{
  "success": false,
  "error": {
    "code": "ORGANIZATION_ACCESS_DENIED",
    "message": "You do not have access to this organization.",
    "system_message": "Access denied to organization",
    "type": "authorization_error",
    "status": 403,
    "details": { "organization_id": "org_abc123" },
    "trace_id": "req_abc123xyz",
    "timestamp": "2026-04-15T10:00:00Z"
  }
}
```

## Related Resources

- [List rules](/docs/api-reference/rules/list)
- [Update a rule (by ID)](/docs/api-reference/rules/update-by-id)
- [Delete a rule (by ID)](/docs/api-reference/rules/delete-by-id)
- [Toggle rule activation](/docs/api-reference/rules/toggle-active)