Retrieve the rules for your account: default rules from rule packs and custom rules. Custom rules come from policy imports or from Create Custom Rule. Each rule includes an active field.With no query parameters, the list includes every rule, active or not. To see only the rules that run when you validate content, pass status=active. To see only your own rules, pass source=custom. Together, ?status=active&source=custom returns only your active custom rules, which is usually what you want while developing custom rules.A rule you just created, deactivated or reactivated can take a few seconds to show its new state in this list.Use rule_id from this response in validation_scope.rules on
Enforce Content. Custom IDs are
prefixed cust_. For rulepack IDs, use id from
Rule Packs, not rule_pack_id on this list.
Untrained custom rules run on anchor_3_0_max.
Query Parameters
string
default:"all"
Which rules to return by enforcement state.
all: every rule, active or not.
active: only the rules that run during validation.
For a custom rule from a policy import, active also requires the import to
be activated, with the rule among its activated rules. Such a rule can show
active: true in the unfiltered list and still be left out here, because it
doesn’t run until its import is activated. See
Activate Rules.
string
default:"all"
Which kind of rule to return.
all: default and custom rules.
custom: only your custom rules. default_rules is an empty array.
default: only default rules from rule packs. custom_rules is an empty array.
Values are case-sensitive and must be lowercase. If you include a parameter, it
must have one of the values above: an empty value such as ?status= returns
400 instead of the full list.Filtering never changes the shape of the response. Both arrays are always
present, and a list the filter excludes is empty. Every *_count field counts
the rules in this response, not all rules on your account. With status=active,
each *_count equals the matching *_active_count.
Response
string
Your customer identifier
array
Default rules from rule packs
Show default rule properties
string
Rule identifier (e.g., signal_mnpi_leak)
string
AI_SIGNAL or REGEX
string
Always default for built-in rules
boolean
Whether this rule is currently active for your account
boolean
Whether this rule can run in simulation. Non-simulatable rules are still
listed so clients can render them disabled.
string
Rule pack this rule belongs to (e.g., sec_finra_comms_v2)
array
Rule-pack grouping identifiers for this rule
number
Confidence threshold for AI signals
string
Threshold comparison operator (e.g., >=)
array
Custom rules, both those extracted from policy imports and those created with
Create Custom Rule
Show custom rule properties
string
Rule identifier (prefixed with cust_)
string
AI_SIGNAL, REGEX, or REQUIRE_NEAR
string
Human-readable rule name
string
Always custom for customer-owned rules
boolean
Whether this rule is turned on. A rule from a policy import also needs
its import activated before it runs; use status=active to list only
the rules that run.
boolean
Whether this rule can run in simulation
string
Import ID this rule was extracted from. Absent for rules created with
POST /api/policies/rules, which belong to no policy. See
API-created rules.
string
do_not_send or send_with_caution
string
fix or flag
string
Text window for evaluation
string
ISO 8601 creation timestamp
integer
Number of default rules in this response (active + deactivated)
integer
Number of active default rules in this response
integer
Number of custom rules in this response (active + deactivated)
integer
Number of active custom rules in this response
integer
Number of rules in this response, default and custom
integer
Number of active rules in this response, default and custom
status or source is present but isn’t one of its allowed values, including an empty value. The body names the parameter, for example {"error": "status must be one of: all, active"}.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ZeroDrift Enforcement API","description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","colors":{"primary":"#16A34A","light":"#07C983","dark":"#15803D"},"logo":{"light":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332","dark":"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_Black_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=dd2ae5c915064ad7ebf1aa495eb2efce"},"favicon":"https://mintcdn.com/zerodrift/C1CP0SqlGtEDTLZM/favicon.svg?fit=max\u0026auto=format\u0026n=C1CP0SqlGtEDTLZM\u0026q=85\u0026s=3ffcd8394a2e8995fcc413d960e17117","api":{"examples":{"defaults":"required"},"mdx":{"auth":{"method":"key","name":"x-api-key"},"server":"https://api.zerodrift.ai"}},"navbar":{"links":[{"href":"mailto:support@zerodrift.ai","label":"Support"},{"href":"/changelog","label":"Changelog"}],"primary":{"type":"button","label":"Open Command","href":"https://app.zerodrift.ai"}},"footer":{},"seo":{"metatags":{"og:description":"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications","slack-app-id":"A0CJQ2CUV8C"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"zerodrift","hasAudioNarration":false,"actualSubdomain":"zerodrift","customDomains":["docs.zerodrift.com"],"gitSource":{"type":"github","owner":"zerodriftai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6b0f455395a7b0367e387aae","clientVersion":"0.0.4397","searchFilterCounts":[{"language":"default","tag":"API reference","count":25},{"language":"default","tag":"Guides","count":24},{"language":"default","tag":"Plugins","count":15},{"language":"default","tag":"Getting Started","count":10},{"language":"default","tag":"Import a Policy","count":7},{"language":"default","tag":"Rules","count":7},{"language":"default","tag":"Claude","count":5},{"language":"default","tag":"ChatGPT and Codex","count":5},{"language":"default","tag":"Enforce and Audit Content","count":5},{"language":"default","tag":"Slack","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/custom-policies/list-rules","slug":"/api-reference/custom-policies/list-rules","pageMetadata":{"title":"List Rules","description":"List default and custom rules, or only the ones that run, with their active/deactivated status","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"List default and custom rules, or only the ones that run, with their active/deactivated status\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Retrieve the rules for your account: default rules from rule packs and custom rules. Custom rules come from policy imports or from `,_jsx(_components.a,{href:`/api-reference/custom-policies/create-rule`,children:`Create Custom Rule`}),`. Each rule includes an `,_jsx(_components.code,{children:`active`}),` field.`]}),`\n`,_jsxs(_components.p,{children:[`With no query parameters, the list includes every rule, active or not. To see only the rules that run when you validate content, pass `,_jsx(_components.code,{children:`status=active`}),`. To see only your own rules, pass `,_jsx(_components.code,{children:`source=custom`}),`. Together, `,_jsx(_components.code,{children:`?status=active\u0026source=custom`}),` returns only your active custom rules, which is usually what you want while developing custom rules.`]}),`\n`,_jsx(_components.p,{children:`A rule you just created, deactivated or reactivated can take a few seconds to show its new state in this list.`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`rule_id`}),` from this response in `,_jsx(_components.code,{children:`validation_scope.rules`}),` on\n`,_jsx(_components.a,{href:`/api-reference/validate/validate-content`,children:`Enforce Content`}),`. Custom IDs are\nprefixed `,_jsx(_components.code,{children:`cust_`}),`. For rulepack IDs, use `,_jsx(_components.code,{children:`id`}),` from\n`,_jsx(_components.a,{href:`/api-reference/rulepacks`,children:`Rule Packs`}),`, not `,_jsx(_components.code,{children:`rule_pack_id`}),` on this list.\nUntrained custom rules run on `,_jsx(_components.code,{children:`anchor_3_0_max`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsxs(ParamField,{query:`status`,type:`string`,default:`all`,id:`param-status`,children:[_jsx(_components.p,{children:`Which rules to return by enforcement state.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`all`}),`: every rule, active or not.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`active`}),`: only the rules that run during validation.`]}),`\n`]}),_jsxs(_components.p,{children:[`For a custom rule from a policy import, `,_jsx(_components.code,{children:`active`}),` also requires the import to\nbe activated, with the rule among its activated rules. Such a rule can show\n`,_jsx(_components.code,{children:`active: true`}),` in the unfiltered list and still be left out here, because it\ndoesn’t run until its import is activated. See\n`,_jsx(_components.a,{href:`/api-reference/custom-policies/activate-rules`,children:`Activate Rules`}),`.`]})]}),`\n`,_jsxs(ParamField,{query:`source`,type:`string`,default:`all`,id:`param-source`,children:[_jsx(_components.p,{children:`Which kind of rule to return.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`all`}),`: default and custom rules.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`custom`}),`: only your custom rules. `,_jsx(_components.code,{children:`default_rules`}),` is an empty array.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`default`}),`: only default rules from rule packs. `,_jsx(_components.code,{children:`custom_rules`}),` is an empty array.`]}),`\n`]})]}),`\n`,_jsxs(_components.p,{children:[`Values are case-sensitive and must be lowercase. If you include a parameter, it\nmust have one of the values above: an empty value such as `,_jsx(_components.code,{children:`?status=`}),` returns\n`,_jsx(_components.code,{children:`400`}),` instead of the full list.`]}),`\n`,_jsxs(_components.p,{children:[`Filtering never changes the shape of the response. Both arrays are always\npresent, and a list the filter excludes is empty. Every `,_jsx(_components.code,{children:`*_count`}),` field counts\nthe rules in this response, not all rules on your account. With `,_jsx(_components.code,{children:`status=active`}),`,\neach `,_jsx(_components.code,{children:`*_count`}),` equals the matching `,_jsx(_components.code,{children:`*_active_count`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`customer_id`,type:`string`,id:`param-customer-id`,children:_jsx(_components.p,{children:`Your customer identifier`})}),`\n`,_jsxs(ResponseField,{name:`default_rules`,type:`array`,id:`param-default-rules`,children:[_jsx(_components.p,{children:`Default rules from rule packs`}),_jsxs(Expandable,{title:`default rule properties`,children:[_jsx(ResponseField,{name:`rule_id`,type:`string`,id:`param-rule-id`,children:_jsxs(_components.p,{children:[`Rule identifier (e.g., `,_jsx(_components.code,{children:`signal_mnpi_leak`}),`)`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AI_SIGNAL`}),` or `,_jsx(_components.code,{children:`REGEX`})]})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source-1`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`default`}),` for built-in rules`]})}),_jsx(ResponseField,{name:`active`,type:`boolean`,id:`param-active`,children:_jsx(_components.p,{children:`Whether this rule is currently active for your account`})}),_jsx(ResponseField,{name:`simulatable`,type:`boolean`,id:`param-simulatable`,children:_jsx(_components.p,{children:`Whether this rule can run in simulation. Non-simulatable rules are still\nlisted so clients can render them disabled.`})}),_jsx(ResponseField,{name:`rule_pack_id`,type:`string`,id:`param-rule-pack-id`,children:_jsxs(_components.p,{children:[`Rule pack this rule belongs to (e.g., `,_jsx(_components.code,{children:`sec_finra_comms_v2`}),`)`]})}),_jsx(ResponseField,{name:`rule_pack_scenario_ids`,type:`array`,id:`param-rule-pack-scenario-ids`,children:_jsx(_components.p,{children:`Rule-pack grouping identifiers for this rule`})}),_jsx(ResponseField,{name:`threshold`,type:`number`,id:`param-threshold`,children:_jsx(_components.p,{children:`Confidence threshold for AI signals`})}),_jsx(ResponseField,{name:`operator`,type:`string`,id:`param-operator`,children:_jsxs(_components.p,{children:[`Threshold comparison operator (e.g., `,_jsx(_components.code,{children:`>=`}),`)`]})})]})]}),`\n`,_jsxs(ResponseField,{name:`custom_rules`,type:`array`,id:`param-custom-rules`,children:[_jsxs(_components.p,{children:[`Custom rules, both those extracted from policy imports and those created with\n`,_jsx(_components.a,{href:`/api-reference/custom-policies/create-rule`,children:`Create Custom Rule`})]}),_jsxs(Expandable,{title:`custom rule properties`,children:[_jsx(ResponseField,{name:`rule_id`,type:`string`,id:`param-rule-id-1`,children:_jsxs(_components.p,{children:[`Rule identifier (prefixed with `,_jsx(_components.code,{children:`cust_`}),`)`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AI_SIGNAL`}),`, `,_jsx(_components.code,{children:`REGEX`}),`, or `,_jsx(_components.code,{children:`REQUIRE_NEAR`})]})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Human-readable rule name`})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source-2`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`custom`}),` for customer-owned rules`]})}),_jsx(ResponseField,{name:`active`,type:`boolean`,id:`param-active-1`,children:_jsxs(_components.p,{children:[`Whether this rule is turned on. A rule from a policy import also needs\nits import activated before it runs; use `,_jsx(_components.code,{children:`status=active`}),` to list only\nthe rules that run.`]})}),_jsx(ResponseField,{name:`simulatable`,type:`boolean`,id:`param-simulatable-1`,children:_jsx(_components.p,{children:`Whether this rule can run in simulation`})}),_jsx(ResponseField,{name:`import_id`,type:`string`,id:`param-import-id`,children:_jsxs(_components.p,{children:[`Import ID this rule was extracted from. Absent for rules created with\n`,_jsx(_components.code,{children:`POST /api/policies/rules`}),`, which belong to no policy. See\n`,_jsx(_components.a,{href:`/guides/api-created-rules`,children:`API-created rules`}),`.`]})}),_jsx(ResponseField,{name:`severity`,type:`string`,id:`param-severity`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`do_not_send`}),` or `,_jsx(_components.code,{children:`send_with_caution`})]})}),_jsx(ResponseField,{name:`action`,type:`string`,id:`param-action`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fix`}),` or `,_jsx(_components.code,{children:`flag`})]})}),_jsx(ResponseField,{name:`window`,type:`string`,id:`param-window`,children:_jsx(_components.p,{children:`Text window for evaluation`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 creation timestamp`})})]})]}),`\n`,_jsx(ResponseField,{name:`default_rules_count`,type:`integer`,id:`param-default-rules-count`,children:_jsx(_components.p,{children:`Number of default rules in this response (active + deactivated)`})}),`\n`,_jsx(ResponseField,{name:`default_rules_active_count`,type:`integer`,id:`param-default-rules-active-count`,children:_jsx(_components.p,{children:`Number of active default rules in this response`})}),`\n`,_jsx(ResponseField,{name:`custom_rules_count`,type:`integer`,id:`param-custom-rules-count`,children:_jsx(_components.p,{children:`Number of custom rules in this response (active + deactivated)`})}),`\n`,_jsx(ResponseField,{name:`custom_rules_active_count`,type:`integer`,id:`param-custom-rules-active-count`,children:_jsx(_components.p,{children:`Number of active custom rules in this response`})}),`\n`,_jsx(ResponseField,{name:`total_rules_count`,type:`integer`,id:`param-total-rules-count`,children:_jsx(_components.p,{children:`Number of rules in this response, default and custom`})}),`\n`,_jsx(ResponseField,{name:`total_active_count`,type:`integer`,id:`param-total-active-count`,children:_jsx(_components.p,{children:`Number of active rules in this response, default and custom`})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`status`}),` or `,_jsx(_components.code,{children:`source`}),` is present but isn’t one of its allowed values, including an empty value. The body names the parameter, for example `,_jsx(_components.code,{children:`{\"error\": \"status must be one of: all, active\"}`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Missing or invalid API key`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL — active custom rules`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules?status=active\u0026source=custom\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL — all active rules`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules?status=active\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL — every rule`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`?status=active\u0026source=custom`}),`, the response keeps the same fields. `,_jsx(_components.code,{children:`default_rules`}),` is empty, and the counts describe only the custom rules returned:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cust_abc123_require_risk_disclosure\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI_SIGNAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Risk Disclosure Required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"severity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"do_not_send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"custom\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"import_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"List Rules","description":"List default and custom rules, or only the ones that run, with their active/deactivated status","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,ParamField,ResponseExample,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Retrieve the rules for your account: default rules from rule packs and custom rules. Custom rules come from policy imports or from `,_jsx(_components.a,{href:`/api-reference/custom-policies/create-rule`,children:`Create Custom Rule`}),`. Each rule includes an `,_jsx(_components.code,{children:`active`}),` field.`]}),`\n`,_jsxs(_components.p,{children:[`With no query parameters, the list includes every rule, active or not. To see only the rules that run when you validate content, pass `,_jsx(_components.code,{children:`status=active`}),`. To see only your own rules, pass `,_jsx(_components.code,{children:`source=custom`}),`. Together, `,_jsx(_components.code,{children:`?status=active\u0026source=custom`}),` returns only your active custom rules, which is usually what you want while developing custom rules.`]}),`\n`,_jsx(_components.p,{children:`A rule you just created, deactivated or reactivated can take a few seconds to show its new state in this list.`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:`rule_id`}),` from this response in `,_jsx(_components.code,{children:`validation_scope.rules`}),` on\n`,_jsx(_components.a,{href:`/api-reference/validate/validate-content`,children:`Enforce Content`}),`. Custom IDs are\nprefixed `,_jsx(_components.code,{children:`cust_`}),`. For rulepack IDs, use `,_jsx(_components.code,{children:`id`}),` from\n`,_jsx(_components.a,{href:`/api-reference/rulepacks`,children:`Rule Packs`}),`, not `,_jsx(_components.code,{children:`rule_pack_id`}),` on this list.\nUntrained custom rules run on `,_jsx(_components.code,{children:`anchor_3_0_max`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`query-parameters`,children:`Query Parameters`}),`\n`,_jsxs(ParamField,{query:`status`,type:`string`,default:`all`,id:`param-status`,children:[_jsx(_components.p,{children:`Which rules to return by enforcement state.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`all`}),`: every rule, active or not.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`active`}),`: only the rules that run during validation.`]}),`\n`]}),_jsxs(_components.p,{children:[`For a custom rule from a policy import, `,_jsx(_components.code,{children:`active`}),` also requires the import to\nbe activated, with the rule among its activated rules. Such a rule can show\n`,_jsx(_components.code,{children:`active: true`}),` in the unfiltered list and still be left out here, because it\ndoesn’t run until its import is activated. See\n`,_jsx(_components.a,{href:`/api-reference/custom-policies/activate-rules`,children:`Activate Rules`}),`.`]})]}),`\n`,_jsxs(ParamField,{query:`source`,type:`string`,default:`all`,id:`param-source`,children:[_jsx(_components.p,{children:`Which kind of rule to return.`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`all`}),`: default and custom rules.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`custom`}),`: only your custom rules. `,_jsx(_components.code,{children:`default_rules`}),` is an empty array.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`default`}),`: only default rules from rule packs. `,_jsx(_components.code,{children:`custom_rules`}),` is an empty array.`]}),`\n`]})]}),`\n`,_jsxs(_components.p,{children:[`Values are case-sensitive and must be lowercase. If you include a parameter, it\nmust have one of the values above: an empty value such as `,_jsx(_components.code,{children:`?status=`}),` returns\n`,_jsx(_components.code,{children:`400`}),` instead of the full list.`]}),`\n`,_jsxs(_components.p,{children:[`Filtering never changes the shape of the response. Both arrays are always\npresent, and a list the filter excludes is empty. Every `,_jsx(_components.code,{children:`*_count`}),` field counts\nthe rules in this response, not all rules on your account. With `,_jsx(_components.code,{children:`status=active`}),`,\neach `,_jsx(_components.code,{children:`*_count`}),` equals the matching `,_jsx(_components.code,{children:`*_active_count`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(ResponseField,{name:`customer_id`,type:`string`,id:`param-customer-id`,children:_jsx(_components.p,{children:`Your customer identifier`})}),`\n`,_jsxs(ResponseField,{name:`default_rules`,type:`array`,id:`param-default-rules`,children:[_jsx(_components.p,{children:`Default rules from rule packs`}),_jsxs(Expandable,{title:`default rule properties`,children:[_jsx(ResponseField,{name:`rule_id`,type:`string`,id:`param-rule-id`,children:_jsxs(_components.p,{children:[`Rule identifier (e.g., `,_jsx(_components.code,{children:`signal_mnpi_leak`}),`)`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AI_SIGNAL`}),` or `,_jsx(_components.code,{children:`REGEX`})]})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source-1`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`default`}),` for built-in rules`]})}),_jsx(ResponseField,{name:`active`,type:`boolean`,id:`param-active`,children:_jsx(_components.p,{children:`Whether this rule is currently active for your account`})}),_jsx(ResponseField,{name:`simulatable`,type:`boolean`,id:`param-simulatable`,children:_jsx(_components.p,{children:`Whether this rule can run in simulation. Non-simulatable rules are still\nlisted so clients can render them disabled.`})}),_jsx(ResponseField,{name:`rule_pack_id`,type:`string`,id:`param-rule-pack-id`,children:_jsxs(_components.p,{children:[`Rule pack this rule belongs to (e.g., `,_jsx(_components.code,{children:`sec_finra_comms_v2`}),`)`]})}),_jsx(ResponseField,{name:`rule_pack_scenario_ids`,type:`array`,id:`param-rule-pack-scenario-ids`,children:_jsx(_components.p,{children:`Rule-pack grouping identifiers for this rule`})}),_jsx(ResponseField,{name:`threshold`,type:`number`,id:`param-threshold`,children:_jsx(_components.p,{children:`Confidence threshold for AI signals`})}),_jsx(ResponseField,{name:`operator`,type:`string`,id:`param-operator`,children:_jsxs(_components.p,{children:[`Threshold comparison operator (e.g., `,_jsx(_components.code,{children:`>=`}),`)`]})})]})]}),`\n`,_jsxs(ResponseField,{name:`custom_rules`,type:`array`,id:`param-custom-rules`,children:[_jsxs(_components.p,{children:[`Custom rules, both those extracted from policy imports and those created with\n`,_jsx(_components.a,{href:`/api-reference/custom-policies/create-rule`,children:`Create Custom Rule`})]}),_jsxs(Expandable,{title:`custom rule properties`,children:[_jsx(ResponseField,{name:`rule_id`,type:`string`,id:`param-rule-id-1`,children:_jsxs(_components.p,{children:[`Rule identifier (prefixed with `,_jsx(_components.code,{children:`cust_`}),`)`]})}),_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-1`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`AI_SIGNAL`}),`, `,_jsx(_components.code,{children:`REGEX`}),`, or `,_jsx(_components.code,{children:`REQUIRE_NEAR`})]})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name`,children:_jsx(_components.p,{children:`Human-readable rule name`})}),_jsx(ResponseField,{name:`source`,type:`string`,id:`param-source-2`,children:_jsxs(_components.p,{children:[`Always `,_jsx(_components.code,{children:`custom`}),` for customer-owned rules`]})}),_jsx(ResponseField,{name:`active`,type:`boolean`,id:`param-active-1`,children:_jsxs(_components.p,{children:[`Whether this rule is turned on. A rule from a policy import also needs\nits import activated before it runs; use `,_jsx(_components.code,{children:`status=active`}),` to list only\nthe rules that run.`]})}),_jsx(ResponseField,{name:`simulatable`,type:`boolean`,id:`param-simulatable-1`,children:_jsx(_components.p,{children:`Whether this rule can run in simulation`})}),_jsx(ResponseField,{name:`import_id`,type:`string`,id:`param-import-id`,children:_jsxs(_components.p,{children:[`Import ID this rule was extracted from. Absent for rules created with\n`,_jsx(_components.code,{children:`POST /api/policies/rules`}),`, which belong to no policy. See\n`,_jsx(_components.a,{href:`/guides/api-created-rules`,children:`API-created rules`}),`.`]})}),_jsx(ResponseField,{name:`severity`,type:`string`,id:`param-severity`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`do_not_send`}),` or `,_jsx(_components.code,{children:`send_with_caution`})]})}),_jsx(ResponseField,{name:`action`,type:`string`,id:`param-action`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`fix`}),` or `,_jsx(_components.code,{children:`flag`})]})}),_jsx(ResponseField,{name:`window`,type:`string`,id:`param-window`,children:_jsx(_components.p,{children:`Text window for evaluation`})}),_jsx(ResponseField,{name:`created_at`,type:`string`,id:`param-created-at`,children:_jsx(_components.p,{children:`ISO 8601 creation timestamp`})})]})]}),`\n`,_jsx(ResponseField,{name:`default_rules_count`,type:`integer`,id:`param-default-rules-count`,children:_jsx(_components.p,{children:`Number of default rules in this response (active + deactivated)`})}),`\n`,_jsx(ResponseField,{name:`default_rules_active_count`,type:`integer`,id:`param-default-rules-active-count`,children:_jsx(_components.p,{children:`Number of active default rules in this response`})}),`\n`,_jsx(ResponseField,{name:`custom_rules_count`,type:`integer`,id:`param-custom-rules-count`,children:_jsx(_components.p,{children:`Number of custom rules in this response (active + deactivated)`})}),`\n`,_jsx(ResponseField,{name:`custom_rules_active_count`,type:`integer`,id:`param-custom-rules-active-count`,children:_jsx(_components.p,{children:`Number of active custom rules in this response`})}),`\n`,_jsx(ResponseField,{name:`total_rules_count`,type:`integer`,id:`param-total-rules-count`,children:_jsx(_components.p,{children:`Number of rules in this response, default and custom`})}),`\n`,_jsx(ResponseField,{name:`total_active_count`,type:`integer`,id:`param-total-active-count`,children:_jsx(_components.p,{children:`Number of active rules in this response, default and custom`})}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200 OK`,numberOfLines:`32`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`32`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"signal_mnpi_leak\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI_SIGNAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"default\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_pack_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"sec_finra_comms_v2\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_pack_scenario_ids\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"threshold\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.60`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"operator\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\">=\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cust_abc123_require_risk_disclosure\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI_SIGNAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Risk Disclosure Required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"severity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"do_not_send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"custom\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"import_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`119`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`115`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`124`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`120`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`400`})}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`status`}),` or `,_jsx(_components.code,{children:`source`}),` is present but isn’t one of its allowed values, including an empty value. The body names the parameter, for example `,_jsx(_components.code,{children:`{\"error\": \"status must be one of: all, active\"}`}),`.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{\"data-numeric\":`true`,children:_jsx(_components.code,{children:`403`})}),_jsx(_components.td,{children:`Missing or invalid API key`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`example`,children:`Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL — active custom rules`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules?status=active\u0026source=custom\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL — all active rules`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules?status=active\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL — every rule`,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.zerodrift.ai/api/policies/rules\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-api-key: YOUR_API_KEY\"`})]}),`\n`]})})})]}),`\n`,_jsxs(_components.p,{children:[`With `,_jsx(_components.code,{children:`?status=active\u0026source=custom`}),`, the response keeps the same fields. `,_jsx(_components.code,{children:`default_rules`}),` is empty, and the counts describe only the custom rules returned:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`21`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`21`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"customer_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"abc-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"default_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"rule_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cust_abc123_require_risk_disclosure\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"AI_SIGNAL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Risk Disclosure Required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"severity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"do_not_send\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"source\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"custom\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"active\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"import_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"550e8400-e29b-41d4-a716-446655440000\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"custom_rules_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_rules_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_active_count\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"List Rules","description":"List default and custom rules, or only the ones that run, with their active/deactivated status","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Query Parameters","slug":"query-parameters","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]},{"title":"Example","slug":"example","depth":2,"children":[]}],"codeExamples":{"response":{"type":"ResponseExample","children":[{"filename":"200 OK","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"32\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"customer_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"abc-123\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"default_rules\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rule_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"signal_mnpi_leak\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"AI_SIGNAL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"default\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rule_pack_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"sec_finra_comms_v2\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rule_pack_scenario_ids\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"threshold\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0.60\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"operator\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\">=\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"custom_rules\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"rule_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"cust_abc123_require_risk_disclosure\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"AI_SIGNAL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"name\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Risk Disclosure Required\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"severity\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"do_not_send\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"source\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"custom\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"active\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"import_id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"550e8400-e29b-41d4-a716-446655440000\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"default_rules_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">119\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"default_rules_active_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">115\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"custom_rules_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"custom_rules_active_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">5\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_rules_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">124\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_active_count\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">120\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"List Rules","path":"/api/policies/rules","servers":[{"url":"https://api.zerodrift.ai"}],"method":"get","request":{"security":[{"title":"API Key Auth","parameters":{"header":{"x-api-key":{"type":"apiKey"}},"query":{},"cookie":{}}}],"parameters":{"query":{"status":{"schema":[{"type":"string","description":"Which rules to return by enforcement state. `all` : every rule, active or not. `active` : only the rules that run during validation. For a custom rule from a policy import, `active` also requires the import to be activated, with the rule among its activated rules. Such a rule can show `active: true` in the unfiltered list and still be left out here, because it doesn’t run until its import is activated. See Activate Rules ."}]},"source":{"schema":[{"type":"string","description":"Which kind of rule to return. `all` : default and custom rules. `custom` : only your custom rules. `default_rules` is an empty array. `default` : only default rules from rule packs. `custom_rules` is an empty array."}]}},"header":{},"cookie":{},"path":{}},"body":{}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"customer_id":[{"type":"string","description":"Your customer identifier"}],"default_rules":[{"type":"array","items":[{"type":"object","properties":{"rule_id":[{"type":"string","description":"Rule identifier (e.g., `signal_mnpi_leak` )"}],"type":[{"type":"string","description":"`AI_SIGNAL` or `REGEX`"}],"source":[{"type":"string","description":"Always `default` for built-in rules"}],"active":[{"type":"boolean","description":"Whether this rule is currently active for your account"}],"simulatable":[{"type":"boolean","description":"Whether this rule can run in simulation. Non-simulatable rules are still listed so clients can render them disabled."}],"rule_pack_id":[{"type":"string","description":"Rule pack this rule belongs to (e.g., `sec_finra_comms_v2` )"}],"rule_pack_scenario_ids":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Rule-pack grouping identifiers for this rule"}],"threshold":[{"type":"number","description":"Confidence threshold for AI signals"}],"operator":[{"type":"string","description":"Threshold comparison operator (e.g., `>=` )"}]}}],"description":"Default rules from rule packs"}],"custom_rules":[{"type":"array","items":[{"type":"object","properties":{"rule_id":[{"type":"string","description":"Rule identifier (prefixed with `cust_` )"}],"type":[{"type":"string","description":"`AI_SIGNAL` , `REGEX` , or `REQUIRE_NEAR`"}],"name":[{"type":"string","description":"Human-readable rule name"}],"source":[{"type":"string","description":"Always `custom` for customer-owned rules"}],"active":[{"type":"boolean","description":"Whether this rule is turned on. A rule from a policy import also needs its import activated before it runs; use `status=active` to list only the rules that run."}],"simulatable":[{"type":"boolean","description":"Whether this rule can run in simulation"}],"import_id":[{"type":"string","description":"Import ID this rule was extracted from. Absent for rules created with `POST /api/policies/rules` , which belong to no policy. See API-created rules ."}],"severity":[{"type":"string","description":"`do_not_send` or `send_with_caution`"}],"action":[{"type":"string","description":"`fix` or `flag`"}],"window":[{"type":"string","description":"Text window for evaluation"}],"created_at":[{"type":"string","description":"ISO 8601 creation timestamp"}]}}],"description":"Custom rules, both those extracted from policy imports and those created with Create Custom Rule"}],"default_rules_count":[{"type":"integer","description":"Number of default rules in this response (active + deactivated)"}],"default_rules_active_count":[{"type":"integer","description":"Number of active default rules in this response"}],"custom_rules_count":[{"type":"integer","description":"Number of custom rules in this response (active + deactivated)"}],"custom_rules_active_count":[{"type":"integer","description":"Number of active custom rules in this response"}],"total_rules_count":[{"type":"integer","description":"Number of rules in this response, default and custom"}],"total_active_count":[{"type":"integer","description":"Number of active rules in this response, default and custom"}]}}],"examples":{"example":{"value":{"customer_id":"\u003cstring>","default_rules":[{"rule_id":"\u003cstring>","type":"\u003cstring>","source":"\u003cstring>","active":true,"simulatable":true,"rule_pack_id":"\u003cstring>","rule_pack_scenario_ids":[{}],"threshold":123,"operator":"\u003cstring>"}],"custom_rules":[{"rule_id":"\u003cstring>","type":"\u003cstring>","name":"\u003cstring>","source":"\u003cstring>","active":true,"simulatable":true,"import_id":"\u003cstring>","severity":"\u003cstring>","action":"\u003cstring>","window":"\u003cstring>","created_at":"\u003cstring>"}],"default_rules_count":123,"default_rules_active_count":123,"custom_rules_count":123,"custom_rules_active_count":123,"total_rules_count":123,"total_active_count":123}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"zerodrift","siteName":"ZeroDrift Enforcement API","title":"List Rules - ZeroDrift Enforcement API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-12-01T21:17:57.588Z","originalFileLocation":"api-reference/custom-policies/list-rules.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"List default and custom rules, or only the ones that run, with their active/deactivated status\">\u003cmeta data-mint-head name=\"application-name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"List Rules - ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Rules\u0026amp;title=List+Rules\u0026amp;description=List+default+and+custom+rules%2C+or+only+the+ones+that+run%2C+with+their+active%2Fdeactivated+status\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=279c651e71e26d9553b004d024147ad19251ae8d753ca2693f51ee596462a243\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"List Rules - ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"ZeroDrift Enforcement API - Enforce regulations and policies on AI content and communications\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://zerodrift.mintlify.site/_mintlify/api/og/v2?division=Rules\u0026amp;title=List+Rules\u0026amp;description=List+default+and+custom+rules%2C+or+only+the+ones+that+run%2C+with+their+active%2Fdeactivated+status\u0026amp;theme=4a77b3342bf61dc8ad6b1fee\u0026amp;signature=279c651e71e26d9553b004d024147ad19251ae8d753ca2693f51ee596462a243\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/zerodrift/kLkBuz49Q8U_6srQ/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ZeroDrift Enforcement API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#16A34A\">\u003cmeta data-mint-head name=\"slack-app-id\" content=\"A0CJQ2CUV8C\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/custom-policies/list-rules.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.zerodrift.com/#organization\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/zerodrift/EnMFM7yTopP4lGmD/logo/ZD_White_Transparent.png?fit=max\u0026auto=format\u0026n=EnMFM7yTopP4lGmD\u0026q=85\u0026s=8a3a1cfcd216c0a056b6a1cd0c50a332\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.zerodrift.com#website\",\"name\":\"ZeroDrift Enforcement API\",\"url\":\"https://docs.zerodrift.com\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules#webpage\",\"url\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules\",\"name\":\"List Rules\",\"description\":\"List default and custom rules, or only the ones that run, with their active/deactivated status\",\"dateModified\":\"2026-12-01T21:17:57.588Z\",\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"ZeroDrift Enforcement API\",\"item\":\"https://docs.zerodrift.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"List Rules\",\"item\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules#apireference\",\"headline\":\"List Rules\",\"name\":\"List Rules\",\"description\":\"List default and custom rules, or only the ones that run, with their active/deactivated status\",\"url\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules\",\"mainEntityOfPage\":{\"@id\":\"https://docs.zerodrift.com/api-reference/custom-policies/list-rules#webpage\"},\"dateModified\":\"2026-12-01T21:17:57.588Z\",\"publisher\":{\"@id\":\"https://docs.zerodrift.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.zerodrift.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ZeroDrift Enforcement API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ZeroDrift Enforcement API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/custom-policies/list-rules.md","siteName":"ZeroDrift Enforcement API","nav":{"global":{},"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"Plugins","pages":[{"title":"Plugins","href":"/codex-plugin"}]},{"tab":"API reference","groups":[{"group":"Getting Started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Errors","href":"/api-reference/errors"},{"title":"OpenAPI specification","href":"/api-reference/openapi"}]},{"group":"Enforce","pages":[{"title":"Enforce Content","api":"POST /api/v3/content/validate","href":"/api-reference/validate/validate-content"},{"title":"Get Verdict","api":"GET /api/v3/jobs/{job_id}","href":"/api-reference/validate/get-results"}]},{"group":"Redact","pages":[{"title":"Redact PII","api":"POST /api/v3/content/redact","href":"/api-reference/redact/redact-text"}]},{"group":"Import a Policy","pages":[{"title":"Import Policy","api":"POST /api/policies/import","href":"/api-reference/custom-policies/import-policy"},{"title":"Get Import Presigned URL","api":"POST /api/policies/import/presigned_url","href":"/api-reference/custom-policies/import-presigned-url"},{"title":"Start Import","api":"POST /api/policies/import/start","href":"/api-reference/custom-policies/start-import"},{"title":"List Policy Imports","api":"GET /api/policies/import","href":"/api-reference/custom-policies/list-imports"},{"title":"Get Import Details","api":"GET /api/policies/import/{import_id}","href":"/api-reference/custom-policies/get-import-details"},{"title":"Edit Imported Rule","api":"PATCH /api/policies/import/{import_id}/rules/{rule_id}","href":"/api-reference/custom-policies/edit-imported-rule"},{"title":"Activate Rules","description":"Activate extracted rules from a policy import so they run during validation","api":"POST /api/policies/import/{import_id}/activate","href":"/api-reference/custom-policies/activate-rules"}]},{"group":"Rules","pages":[{"title":"List Rules","api":"GET /api/policies/rules","href":"/api-reference/custom-policies/list-rules"},{"title":"Create Custom Rule","description":"Create a customer-owned AI_SIGNAL, REGEX, or REQUIRE_NEAR rule","api":"POST /api/policies/rules","href":"/api-reference/custom-policies/create-rule"},{"title":"Get Custom Rule","api":"GET /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/get-rule"},{"title":"Edit Custom Rule","api":"PATCH /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/edit-rule"},{"title":"Delete Custom Rule","api":"DELETE /api/policies/rules/{rule_id}","href":"/api-reference/custom-policies/delete-rule"},{"title":"Deactivate Rules","api":"POST /api/policies/rules/deactivate","href":"/api-reference/custom-policies/deactivate-rules"},{"title":"Reactivate Rules","api":"POST /api/policies/rules/activate","href":"/api-reference/custom-policies/reactivate-rules"}]},{"group":"Rule Packs","pages":[{"title":"Rule Packs","api":"GET /api/rulepacks/","href":"/api-reference/rulepacks"}]},{"group":"Activity","pages":[{"title":"List Activity","api":"GET /api/activities","href":"/api-reference/activities/list-activities"},{"title":"Get Activity","api":"GET /api/activities/{activity_id}","href":"/api-reference/activities/get-activity"}]},{"group":"Training Studio","pages":[{"title":"Train Policy Adapter","api":"POST /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/train-policy"},{"title":"Get Training Status","api":"GET /api/policies/import/{import_id}/train","href":"/api-reference/training-studio/get-training-status"}]}]}]},"basePath":"","title":"List Rules - ZeroDrift Enforcement API","deploymentId":"dpl_GDNWf1tLGuMA7VZdZjLPVcJLRJgG","buildId":"dpl_GDNWf1tLGuMA7VZdZjLPVcJLRJgG","dynamics":["c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["OpenApiReferenceProvider-DiWQR0Dw.js","snippetPresets-BmylJwUX.js","utils-C2fWuTLj.js","style-to-object-BY3JEAdk.js","utils-CSS9SJgm.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-B_HuAfYC.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bink-3az.js","_Uint8Array-DH8dt3QM.js","isObject-FP1Yky1u.js","ApiExamples-DKwL65Qp.js","usePlaygroundInputsStore-Byf7Wjg-.js","shallow-xQA3heHi.js","isEqual-CWFuCnsy.js","CodeSnippets-DrJ7GrW7.js","CodeSnippet-Bau4ZVdW.js","use-playground-group-access-BIWJdxB8.js","Page-DRR8sPxe.js","api-description-markdown-Bl6IXimh.js","DynamicMarkdown-CsDDjLGd.js","SectionHeading-CDNIUELf.js","MethodPill-B33MQrA3.js","getPastedJson-B5OQB7us.js","Check2Icon-lMIePS93.js","axios-CsQoIw0U.js"]}