Loki Docs
Tools › Savings goals › Update a savings goal

Update a savings goal

update_savings_goalChanges
What it does
Changes or deletes something you had. Your assistant can ask you to confirm first. Safe to retry: the same call twice changes nothing more.
Permission
Savings goals, change goals:write

What your assistant is told

Edit an existing savings goal — rename it, change the target amount, set/change the target date, or fix the currency ONLY while the goal has no deposits yet. goal_id is the goal's UUID (from get_savings_goal_progress). SPARSE patch: pass only what changes; omitted fields keep their current value. This edits the goal's DEFINITION only — it does NOT change how much is already saved (the current total); money only moves via log_savings_deposit. Once a deposit has landed the currency is frozen: a goal's saved total is in that currency, so renaming the code would redenominate it rather than convert it, and the call fails with currency_mismatch. To save in a different currency, create a new goal. Returns the updated goal.

Parameters

  • goalIdid, requiredUUID of the goal to edit. Use get_savings_goal_progress to find it.
  • nametext, optionalNew goal name. Omit to keep the current name.
  • targetMinorwhole number, optionalNew target amount in integer minor units (cents, > 0). Omit to keep the current target.
  • currencytext, optionalNew 3-letter ISO 4217 currency code. Only accepted while the goal has no deposits; omit to keep unchanged.
  • targetDateIsotext, optionalNew target date as "YYYY-MM-DD". Omit to keep the current date.