Skip to content

Set Rule State

POST
/rules/{rule_id}/state
curl --request POST \
--url https://example.com/rules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/state \
--header 'Content-Type: application/json' \
--data '{ "confirm_links": 1, "state": "draft" }'
rule_id
required
Rule Id
string format: uuid
Media typeapplication/json
StateChange
object
confirm_links
Any of:
integer
state
required
State
string
Allowed values: draft active disabled archived

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