curl -X PATCH 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"mode": "ACTIVE"}'import os
import requests
resp = requests.patch(
'https://verification.didit.me/v3/transactions/rules/RULE_UUID/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={'mode': 'ACTIVE'},
timeout=15,
)
resp.raise_for_status()
print(resp.json()['mode'])const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({mode: 'ACTIVE'})
};
fetch('https://verification.didit.me/v3/transactions/rules/{rule_uuid}/', 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://verification.didit.me/v3/transactions/rules/{rule_uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'ACTIVE'
]),
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://verification.didit.me/v3/transactions/rules/{rule_uuid}/"
payload := strings.NewReader("{\n \"mode\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://verification.didit.me/v3/transactions/rules/{rule_uuid}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/transactions/rules/{rule_uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"category": "<string>",
"mode": "ACTIVE",
"evaluation_mode": "ALL",
"scope": {
"transaction_types": [
"<string>"
],
"directions": [
"INBOUND"
],
"action_types": [
"<string>"
]
},
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>",
"value_type": "list",
"score": 50,
"group_index": 123,
"group_logic": "AND",
"groups_logic": "OR"
}
],
"aggregation": [
{
"value": 123,
"metric": "count",
"field": "amount",
"operator": "eq",
"window": "1d",
"filters": {}
}
],
"actions": [
{
"type": "add_score",
"value": 123
}
],
"metadata": {},
"severity": "UNKNOWN",
"source": "PRESET",
"library_key": "<string>",
"latest_triggered_at": "2023-11-07T05:31:56Z",
"run_count": 123,
"approved_count": 123,
"reviewed_count": 123,
"declined_count": 123,
"awaiting_user_count": 123,
"approved_pct": 123,
"reviewed_pct": 123,
"declined_pct": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{}Update Rule
Partially update a rule. Custom rules accept every configuration field. Library (PRESET) rules accept only mode - use it to activate, disable, or switch a preset to TEST; any other field returns 400.
curl -X PATCH 'https://verification.didit.me/v3/transactions/rules/RULE_UUID/' \
-H 'x-api-key: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"mode": "ACTIVE"}'import os
import requests
resp = requests.patch(
'https://verification.didit.me/v3/transactions/rules/RULE_UUID/',
headers={'x-api-key': os.environ['DIDIT_API_KEY']},
json={'mode': 'ACTIVE'},
timeout=15,
)
resp.raise_for_status()
print(resp.json()['mode'])const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({mode: 'ACTIVE'})
};
fetch('https://verification.didit.me/v3/transactions/rules/{rule_uuid}/', 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://verification.didit.me/v3/transactions/rules/{rule_uuid}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'mode' => 'ACTIVE'
]),
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://verification.didit.me/v3/transactions/rules/{rule_uuid}/"
payload := strings.NewReader("{\n \"mode\": \"ACTIVE\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://verification.didit.me/v3/transactions/rules/{rule_uuid}/")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"mode\": \"ACTIVE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://verification.didit.me/v3/transactions/rules/{rule_uuid}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"mode\": \"ACTIVE\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"category": "<string>",
"mode": "ACTIVE",
"evaluation_mode": "ALL",
"scope": {
"transaction_types": [
"<string>"
],
"directions": [
"INBOUND"
],
"action_types": [
"<string>"
]
},
"conditions": [
{
"field": "<string>",
"operator": "eq",
"value": "<unknown>",
"value_type": "list",
"score": 50,
"group_index": 123,
"group_logic": "AND",
"groups_logic": "OR"
}
],
"aggregation": [
{
"value": 123,
"metric": "count",
"field": "amount",
"operator": "eq",
"window": "1d",
"filters": {}
}
],
"actions": [
{
"type": "add_score",
"value": 123
}
],
"metadata": {},
"severity": "UNKNOWN",
"source": "PRESET",
"library_key": "<string>",
"latest_triggered_at": "2023-11-07T05:31:56Z",
"run_count": 123,
"approved_count": 123,
"reviewed_count": 123,
"declined_count": 123,
"awaiting_user_count": 123,
"approved_pct": 123,
"reviewed_pct": 123,
"declined_pct": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{}Authorizations
Your application's API key, from Developers -> API keys in the Business Console. The primary key has full access. A named key can be scoped: none, read or write per resource, limited to some workflows or to approved sessions, to a list of IP addresses, and to an expiry date. 401 means the key is missing, wrong, revoked or expired; 403 means the key has no access to this resource or action, or the request came from an address outside its IP list; 404 on a session route means the session is outside the key's workflows or statuses. A key without media access receives image, video and PDF URLs as null, and a key without sessions write receives session links and tokens as null. See https://docs.didit.me/console/api-keys.
Path Parameters
The rule's uuid from list or create.
Body
Partial update. Custom rules accept every field; library (PRESET) rules accept only mode - anything else returns 400.
Rule name. Unique per application among non-deleted rules; duplicates return 400.
Risk theme used for grouping and reporting, e.g. finance, aml_ctf, anomaly_detection, fatf, device_intelligence, crypto_monitoring, travel_rule, responsible_gaming, e_commerce.
ACTIVE evaluates live. TEST evaluates and records rule runs but never touches score or status - the recommended starting mode. DISABLED is skipped.
ACTIVE, DISABLED, TEST Whether every condition must match (ALL) or at least one (ANY). Ignored when conditions use group_index.
ALL, ANY Which transactions the rule applies to. Only these three keys are accepted.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
One rule action. A rule can carry several; all are applied together when it matches. Rules in TEST mode record what they would have done without applying any action.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Free-form metadata stored on the rule.
Response
The updated rule.
Rule name. Unique per application among non-deleted rules; duplicates return 400.
Risk theme used for grouping and reporting, e.g. finance, aml_ctf, anomaly_detection, fatf, device_intelligence, crypto_monitoring, travel_rule, responsible_gaming, e_commerce.
ACTIVE evaluates live. TEST evaluates and records rule runs but never touches score or status - the recommended starting mode. DISABLED is skipped.
ACTIVE, DISABLED, TEST Whether every condition must match (ALL) or at least one (ANY). Ignored when conditions use group_index.
ALL, ANY Which transactions the rule applies to. Only these three keys are accepted.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
One rule action. A rule can carry several; all are applied together when it matches. Rules in TEST mode record what they would have done without applying any action.
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
Show child attributes
Show child attributes
Free-form metadata stored on the rule.
Informational severity carried by library rules; not settable on custom rules.
UNKNOWN, LOW, MEDIUM, HIGH, CRITICAL PRESET rules come from the library (install/uninstall, mode-only edits); CUSTOM rules are fully yours.
PRESET, CUSTOM Stable library identifier; null for custom rules.
How many transactions matched this rule.