Create a Rule

Use secret API key to create a Rule resource.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
🚧

Account configuration is required before testing transactions

If you are interested in access to this feature, please contact [email protected]!

Creates a new custom fraud rule using the specified set of conditions, logical operator, action, and priority order. The request body must define the rule’s logic (e.g., risk score threshold, country code, amount limits), the operator (AND/OR), the desired action on matched transactions, and the rule’s enabled status.

This endpoint allows you to automate fraud interventions and quickly adapt your strategy as fraud patterns evolve. Use it to add new controls, refine your review criteria, or respond to emerging threats.

Example Response:

{
  "data": {
    "id": "frl_abcdefg123456",
    "type": "fraud.rule",
    "enabled": true,
    "name": "My 1st Rule",
    "operator": "AND",
    "rules": [
      {
        "rule_attribute": "risk_score_gte",
        "rule_value": "700"
      },
      {
        "rule_attribute": "card_country_id",
        "rule_value": [
          "NG"
        ]
      }
    ],
    "action": "block",
    "rule_order": 1,
    "created_at": "2025-07-21T10:01:23.456Z",
    "updated_at": null
  }
}

See attribute details on List all rules.

Body Params
integer
Defaults to 1

Order of the rule attribute. The rule attribute determines the order; lower values are processed first.

boolean
Defaults to true

Enabled or disabled the rule.

string
Defaults to review

Action taken for this rule. Valid values allow, block, or review. Default is review.

string

Name of the rule.

rules
array of objects

List of rule attributes

rules
string
Defaults to AND

Logical operator for the rules. Accepted value are "AND" and "OR".

Response

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json