Create Rule
POST
/rules
const url = 'https://example.com/rules';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"account_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"activate":false,"amount_exact":1,"amount_max":1,"amount_min":1,"category_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","direction":"debit","effective_from":"2026-04-15","match_field":"payee","match_mode":"equals","match_text":"example","note":"example","pair_account_a":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","pair_account_b":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","payee_name":"example","priority":100,"type":"categorize","window_days":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/rules \ --header 'Content-Type: application/json' \ --data '{ "account_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "activate": false, "amount_exact": 1, "amount_max": 1, "amount_min": 1, "category_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "direction": "debit", "effective_from": "2026-04-15", "match_field": "payee", "match_mode": "equals", "match_text": "example", "note": "example", "pair_account_a": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "pair_account_b": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "payee_name": "example", "priority": 100, "type": "categorize", "window_days": 1 }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
RuleCreate
object
account_ids
Any of:
Array<string>
null
activate
Activate
boolean
priority
Priority
integer
type
required
Type
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
RuleOut
object
action
required
Action
string
applied_count
required
Applied Count
integer
id
required
Id
string format: uuid
predicate
required
Predicate
string
priority
required
Priority
integer
state
required
State
string
type
required
Type
string
Example generated
{ "action": "example", "applied_count": 1, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "note": "example", "payee_scope": "example", "predicate": "example", "priority": 1, "state": "example", "type": "example", "window_days": 1}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Example generated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}