Skip to main content
GET
/
api
/
policies
/
rules
List Rules
curl --request GET \
  --url https://api.example.com/api/policies/rules
{
  "customer_id": "abc-123",
  "default_rules": [
    {
      "rule_id": "signal_mnpi_leak",
      "type": "AI_SIGNAL",
      "source": "default",
      "active": true,
      "rule_pack_id": "sec_finra_comms_v2",
      "rule_pack_scenario_ids": ["scenario_email_general", "scenario_all_general"],
      "threshold": 0.60,
      "operator": ">="
    }
  ],
  "custom_rules": [
    {
      "rule_id": "cust_abc123_require_risk_disclosure",
      "type": "AI_SIGNAL",
      "name": "Risk Disclosure Required",
      "severity": "high",
      "source": "custom",
      "active": true,
      "import_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ],
  "default_rules_count": 119,
  "default_rules_active_count": 115,
  "custom_rules_count": 5,
  "custom_rules_active_count": 5,
  "total_rules_count": 124,
  "total_active_count": 120
}

Documentation Index

Fetch the complete documentation index at: https://zerodrift.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Retrieve all rules for your account, including default rules (from rule packs and scenarios) and custom rules (from policy imports). Each rule includes an active field indicating whether it will run during validation.

Response

customer_id
string
Your customer identifier
default_rules
array
Default rules from rule packs and scenarios
custom_rules
array
Custom rules from policy imports
default_rules_count
integer
Total number of default rules (active + deactivated)
default_rules_active_count
integer
Number of active default rules
custom_rules_count
integer
Total number of custom rules (active + deactivated)
custom_rules_active_count
integer
Number of active custom rules
total_rules_count
integer
Total rules across default + custom
total_active_count
integer
Total active rules across default + custom
{
  "customer_id": "abc-123",
  "default_rules": [
    {
      "rule_id": "signal_mnpi_leak",
      "type": "AI_SIGNAL",
      "source": "default",
      "active": true,
      "rule_pack_id": "sec_finra_comms_v2",
      "rule_pack_scenario_ids": ["scenario_email_general", "scenario_all_general"],
      "threshold": 0.60,
      "operator": ">="
    }
  ],
  "custom_rules": [
    {
      "rule_id": "cust_abc123_require_risk_disclosure",
      "type": "AI_SIGNAL",
      "name": "Risk Disclosure Required",
      "severity": "high",
      "source": "custom",
      "active": true,
      "import_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  ],
  "default_rules_count": 119,
  "default_rules_active_count": 115,
  "custom_rules_count": 5,
  "custom_rules_active_count": 5,
  "total_rules_count": 124,
  "total_active_count": 120
}

Example

curl -X GET "https://{api-url}/api/policies/rules" \
  -H "x-api-key: YOUR_API_KEY"