Skip to main content
Version: Next

Create a Rule


Endpoint Overview

The Rule creation endpoint is part of our Rules Management API, designed to streamline the way you define and handle fraud detection rules within your organization. With this endpoint, you can programmatically add new rules that specify conditions (triggers) and the resulting actions (allow, review, deny). Each rule can be prioritized and enabled or disabled as needed, providing you with robust and flexible control over fraud management.


For any questions or uncertainties regarding this endpoint, our Support Team is available for assistance.

Request Parameters

Request parameters in JSON format

Toggle to view an example of request parameters in JSON format for creating a rule
"externalId": "rule-1",
"name": "Deny merchant",
"description": "Deny suspicious merchant",
"trigger": "transaction.merchant == \"suspicious-merchant-1\"",
"action": "deny",
"status": "enabled",
"priority": 1

Request parameters: Field Reference Table

FieldData TypeDescription
Unique identifier for the rule from an external system.
Brief title for the rule.
Detailed explanation of the rule's functionality.
Logical expressions to evaluate incoming pre-auth transactions.
Action to take when the trigger is met. Can be allow, review, or deny.
Current state of the rule. Can be enabled, disabled, or archived.
Priority level for the rule. Ranges from 1 (highest) to 5 (lowest).

Response Parameters

Status CodeStatus MessageDescriptionSchema
200OKStandard response for successful HTTP requests.200 OK - Rule creation response
4xx, 500, 501, 502, 503, 504errorVarious error messages for unsuccessful HTTP requests.Problem response

Code Samples

curl -X POST '' \
-H 'Content-Type: application/json' \
-H "authorisation: Bearer $ACCESS_TOKEN" \
--data-raw '{
"name":"Deny merchant",
"description":"Deny suspicious merchant",
"trigger":"transaction.merchant == \"suspicious-merchant-1\"",