Deactivate Rules
curl --request POST \
--url https://api.zerodrift.ai/api/policies/rules/deactivate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"rule_pack_id": "<string>",
"import_id": "<string>",
"rule_pack_scenario_id": "<string>",
"rule_ids": [
{}
]
}
'import requests
url = "https://api.zerodrift.ai/api/policies/rules/deactivate"
payload = {
"rule_pack_id": "<string>",
"import_id": "<string>",
"rule_pack_scenario_id": "<string>",
"rule_ids": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rule_pack_id: '<string>',
import_id: '<string>',
rule_pack_scenario_id: '<string>',
rule_ids: [{}]
})
};
fetch('https://api.zerodrift.ai/api/policies/rules/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerodrift.ai/api/policies/rules/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rule_pack_id' => '<string>',
'import_id' => '<string>',
'rule_pack_scenario_id' => '<string>',
'rule_ids' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerodrift.ai/api/policies/rules/deactivate"
payload := strings.NewReader("{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zerodrift.ai/api/policies/rules/deactivate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/policies/rules/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"deactivated_custom_count": 2,
"deactivated_custom_rule_ids": [
"cust_abc123_require_risk_disclosure",
"cust_abc123_past_performance_disclaimer"
],
"deactivated_default_count": 47,
"deactivated_default_rule_ids": [
"signal_mnpi_leak",
"signal_promissory_tone"
],
"errors": []
}
Rules
Deactivate Rules
Deactivate rules by rule pack, import, rule-pack scenario selector, or specific IDs
POST
/
api
/
policies
/
rules
/
deactivate
Deactivate Rules
curl --request POST \
--url https://api.zerodrift.ai/api/policies/rules/deactivate \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"rule_pack_id": "<string>",
"import_id": "<string>",
"rule_pack_scenario_id": "<string>",
"rule_ids": [
{}
]
}
'import requests
url = "https://api.zerodrift.ai/api/policies/rules/deactivate"
payload = {
"rule_pack_id": "<string>",
"import_id": "<string>",
"rule_pack_scenario_id": "<string>",
"rule_ids": [{}]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
rule_pack_id: '<string>',
import_id: '<string>',
rule_pack_scenario_id: '<string>',
rule_ids: [{}]
})
};
fetch('https://api.zerodrift.ai/api/policies/rules/deactivate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zerodrift.ai/api/policies/rules/deactivate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'rule_pack_id' => '<string>',
'import_id' => '<string>',
'rule_pack_scenario_id' => '<string>',
'rule_ids' => [
[
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zerodrift.ai/api/policies/rules/deactivate"
payload := strings.NewReader("{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zerodrift.ai/api/policies/rules/deactivate")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zerodrift.ai/api/policies/rules/deactivate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"rule_pack_id\": \"<string>\",\n \"import_id\": \"<string>\",\n \"rule_pack_scenario_id\": \"<string>\",\n \"rule_ids\": [\n {}\n ]\n}"
response = http.request(request)
puts response.read_body{
"deactivated_custom_count": 2,
"deactivated_custom_rule_ids": [
"cust_abc123_require_risk_disclosure",
"cust_abc123_past_performance_disclaimer"
],
"deactivated_default_count": 47,
"deactivated_default_rule_ids": [
"signal_mnpi_leak",
"signal_promissory_tone"
],
"errors": []
}
Deactivate rules so they are skipped during validation. Custom rules are soft-deactivated (preserved for audit trail). Default rules are stored as deactivated on your customer record.
Request Body
At least one field is required. Multiple fields can be combined in a single request.
Response
{
"deactivated_custom_count": 2,
"deactivated_custom_rule_ids": [
"cust_abc123_require_risk_disclosure",
"cust_abc123_past_performance_disclaimer"
],
"deactivated_default_count": 47,
"deactivated_default_rule_ids": [
"signal_mnpi_leak",
"signal_promissory_tone"
],
"errors": []
}
Example
Three ways to select what to deactivate on the same endpoint: byrule_pack_id, by import_id, or by specific rule_ids.
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rule_pack_id": "sec_finra_comms_v2"}'
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"import_id": "550e8400-e29b-41d4-a716-446655440000"}'
curl -X POST "https://api.zerodrift.ai/api/policies/rules/deactivate" \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"rule_ids": ["signal_mnpi_leak", "cust_abc123_rule1"]}'

