---
title: "Update existing rule."
method: PUT
path: "/v1/rules/{id}"
tags: ["rules"]
---

# Update existing rule.

`PUT /v1/rules/{id}`

Update existing rule.

## Path parameters

- `id` string, required

## Headers

- `X-Trace-Id` string, uuid

## Request body

- RuleUpdate
  - `title` string, string
  - `description` string, string
  - `rule_group_id` string, string — ID of the rule group under which the rule must be stored. Either this field or rule_group_title is mandatory.
  - `order` integer
  - `trigger` 'store-journal' | 'update-journal' | 'manual-activation', string — Which action is necessary for the rule to fire? Use either store-journal, update-journal or manual-activation.
  - `active` boolean — Whether or not the rule is even active. Default is true.
  - `strict` boolean — If the rule is set to be strict, ALL triggers must hit in order for the rule to fire. Otherwise, just one is enough. Default value is true.
  - `stop_processing` boolean — If this value is true and the rule is triggered, other rules after this one in the group will be skipped. Default value is false.
  - `triggers` RuleTriggerUpdate[]
    - `type` 'from_account_starts' | 'from_account_ends' | 'from_account_is' | 'from_account_contains' | 'to_account_starts' | 'to_account_ends' | 'to_account_is' | 'to_account_contains' | 'amount_less' | 'amount_exactly' | 'amount_more' | 'description_starts' | 'description_ends' | 'description_contains' | 'description_is' | 'transaction_type' | 'category_is' | 'budget_is' | 'tag_is' | 'currency_is' | 'has_attachments' | 'has_no_category' | 'has_any_category' | 'has_no_budget' | 'has_any_budget' | 'has_no_tag' | 'has_any_tag' | 'notes_contains' | 'notes_starts' | 'notes_end' | 'notes_are' | 'no_notes' | 'any_notes' | 'source_account_is' | 'destination_account_is' | 'source_account_starts', string — The type of thing this trigger responds to. A limited set is possible
    - `value` string, string — The accompanying value the trigger responds to. This value is often mandatory, but this depends on the trigger. If the rule trigger is something like 'has any tag', submit the string 'true'.
    - `order` integer — Order of the trigger
    - `active` boolean — If the trigger is active.
    - `stop_processing` boolean — When true, other triggers will not be checked if this trigger was triggered.
  - `actions` RuleActionUpdate[]
    - `type` 'user_action' | 'set_category' | 'clear_category' | 'set_budget' | 'clear_budget' | 'add_tag' | 'remove_tag' | 'remove_all_tags' | 'set_description' | 'append_description' | 'prepend_description' | 'set_source_account' | 'set_destination_account' | 'set_notes' | 'append_notes' | 'prepend_notes' | 'clear_notes' | 'link_to_bill' | 'convert_withdrawal' | 'convert_deposit' | 'convert_transfer' | 'delete_transaction', string — The type of thing this action will do. A limited set is possible.
    - `value` string, string, nullable — The accompanying value the action will set, change or update. Can be empty, but for some types this value is mandatory.
    - `order` integer — Order of the action
    - `active` boolean — If the action is active.
    - `stop_processing` boolean — When true, other actions will not be fired after this action has fired.

## Response `200`

Updated rule stored, result in response

## Other responses

- `400` — Bad request
- `401` — Unauthenticated
- `404` — Page not found
- `422` — Validation error. The body will have the exact details.
- `500` — Internal exception

---

[API](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-develop.md) · [All operations](https://skmtc.dev/firefly-iii/apis/firefly-iii-api-develop/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/firefly-iii/firefly-iii-api-develop/revisions/8a1f6472e04b/schema)
