Skip to content

Create Rule

POST
/rules
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 }'
Media typeapplication/json
RuleCreate
object
account_ids
Any of:
Array<string>
activate
Activate
boolean
amount_exact
Any of:
number
amount_max
Any of:
number
amount_min
Any of:
number
category_id
Any of:
string format: uuid
direction
Any of:
string
Allowed values: debit credit
effective_from
Any of:
string format: date
match_field
Any of:
string
Allowed values: payee description payee_or_description
match_mode
Any of:
string
Allowed values: equals prefix contains
match_text
Any of:
string
note
Any of:
string
pair_account_a
Any of:
string format: uuid
pair_account_b
Any of:
string format: uuid
payee_name
Any of:
string
priority
Priority
integer
default: 100
type
required
Type
string
Allowed values: categorize rename transfer_link
window_days
Any of:
integer
<= 14

Successful Response

Media typeapplication/json
RuleOut
object
action
required
Action
string
applied_count
required
Applied Count
integer
id
required
Id
string format: uuid
note
required
Any of:
string
payee_scope
Any of:
string
predicate
required
Predicate
string
priority
required
Priority
integer
state
required
State
string
type
required
Type
string
window_days
required
Any of:
integer

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>
ValidationError
object
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"
}
]
}