Skip to main content
Every rule capability of the Business Console is also available programmatically: through the Management API with your application API key, and through the Didit MCP for AI agents acting as a signed-in console user. Use them to manage rules from code, keep rule sets in version control, or let an AI assistant build and migrate rules for you.

When to use which surface

The endpoints

The matching MCP tools are didit_transaction_rule_list, didit_transaction_rule_get, didit_transaction_rule_create, didit_transaction_rule_update, didit_transaction_rule_delete, didit_transaction_rule_backtest, didit_transaction_rule_library_list, didit_transaction_rule_install, and didit_transaction_rule_uninstall - see the MCP tool reference. The full schema - the field catalog, all 19 condition operators, velocity windows, grouped conditions, and the six action types - is documented on the Rules & Scoring page and embedded in the API reference.

Create, backtest, activate

The safe rollout pattern for any new rule:
1

Create the rule in TEST mode

A TEST rule evaluates on every new transaction and records what it would have matched, but never touches the transaction’s score or status.
2

Backtest against your history

A surprising matched count means the thresholds need tuning before the rule can act on anything.
3

Activate

The rule applies to all new transactions immediately.

Migrating rules from another provider

Because rule creation is a plain API call with a fully documented schema, an AI assistant can translate another provider’s rule export into Didit rules for you.
  1. Export your rules from the current provider - most tools export to CSV or Excel.
  2. Drop the file into the Didit console assistant (or any MCP-connected agent like Claude with the Didit MCP attached). Spreadsheets are converted to text automatically.
  3. The assistant maps each row to the Didit schema - conditions, velocity windows, actions - and shows you the mapping, calling out anything that has no Didit equivalent, before creating anything.
  4. On your go-ahead it creates the rules in TEST mode, backtests them against your own transaction history, and reports created / failed / unmappable rows.
  5. Review the numbers and activate the rules that look right, from the console or with a PATCH {"mode": "ACTIVE"}.
A provider export like this:
becomes rules like this:
Before recreating a provider’s rule as custom, check the rule library: Didit ships 150+ presets covering the common typologies (structuring, velocity, sanctions exposure, device reuse, crypto risk), and installing a preset is one call.

Validation errors are precise on purpose

The create and update endpoints validate conditions, aggregation, and scope values against exactly what the rule engine accepts: unknown operators or metrics, malformed windows ("30days" instead of "30d"), invalid scope directions, contains_any without a list, fuzzy_match without a score, and change_status to AWAITING_USER without a workflow_id all return a 400 naming the index and the problem - instead of storing a rule that silently never matches. Agents and scripts should read the error body and fix the payload. Extra scope keys beyond transaction_types, directions, and action_types are stored but ignored by the engine, matching how the Business Console has always saved them.

Next steps

Rules & Scoring

The full rule schema: fields, operators, velocity windows, actions.

Create Rule API

Endpoint reference with request and response schemas.

Rules library

The 150+ preset catalogue and its bundles.

MCP overview

Connect an AI agent to your Didit workspace.