Create a rule
POST
apiKeyheader
AuthorizationBearer <token>Your secret API key, for example az_live_.... Use az_test_... keys against the sandbox.
application/json- body
name*stringwhen*stringExpression evaluated against the check context.
action*stringValue in
"allow""review""deny"priority?integerLower numbers run first.
Default
100enabled?booleanDefault
trueThe rule was created.
application/json- response
name*stringwhen*stringExpression evaluated against the check context.
action*stringValue in
"allow""review""deny"priority?integerLower numbers run first.
Default
100enabled?booleanDefault
trueid*stringcreatedAt*stringFormat
date-timecurl -X POST 'https://api.abusezero.com/v1/rules' \ -H 'Content-Type: application/json' \ -d '{ "name": "Block repeat trials", "when": "benefit.previousClaims >= 1 && benefit.type == \"free_trial\"", "action": "deny", "priority": 10}'Example Response
{ "name": "string", "when": "string", "action": "allow", "priority": 100, "enabled": true, "id": "string", "createdAt": "2019-08-24T14:15:22Z"}