> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zerodrift.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Deactivate Rules

> Deactivate rules by rule pack, import, rule-pack scenario selector, or specific IDs

Deactivate rules so they are skipped during validation. Custom rules are soft-deactivated (preserved for audit trail). Default rules are stored as deactivated on your customer record.

## Request Body

**rule\_pack\_id** `string`

Deactivate all rules in a rule pack (e.g., `sec_finra_comms_v2`)

**import\_id** `string`

Deactivate all custom rules from this import

**rule\_pack\_scenario\_id** `string`

Deactivate all default rules for this rule-pack scenario selector

**rule\_ids** `array`

Array of rule ID strings to deactivate (custom or default)

> [!NOTE]
>
> At least one field is required. Multiple fields can be combined in a single request.

## Response

**deactivated\_custom\_count** `integer`

Number of custom rules deactivated

**deactivated\_custom\_rule\_ids** `array`

List of deactivated custom rule IDs

**deactivated\_default\_count** `integer`

Number of default rules deactivated

**deactivated\_default\_rule\_ids** `array`

List of deactivated default rule IDs

**errors** `array`

List of error messages for rules that could not be deactivated. Empty array when no errors.

```json 200 OK theme={null}
{
  "deactivated_custom_count": 2,
  "deactivated_custom_rule_ids": [
    "cust_abc123_require_risk_disclosure",
    "cust_abc123_past_performance_disclaimer"
  ],
  "deactivated_default_count": 47,
  "deactivated_default_rule_ids": [
    "signal_mnpi_leak",
    "signal_promissory_tone"
  ],
  "errors": []
}
```

## Example

Three ways to select what to deactivate on the same endpoint: by
`rule_pack_id`, by `import_id`, or by specific `rule_ids`.

```bash cURL — by rule pack theme={null}
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_pack_id": "sec_finra_comms_v2"}'
```

```bash cURL — by import theme={null}
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"import_id": "550e8400-e29b-41d4-a716-446655440000"}'
```

```bash cURL — by specific rules theme={null}
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"rule_ids": ["signal_mnpi_leak", "cust_abc123_rule1"]}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.