update_goal
Update a savings goal. Only passed fields change; accounts replaces the whole set. Use status to pause, archive or restore a goal. Fails when an account would pass 100% shared across non-archived goals, the new currency has no exchange rate, or fixed amounts alone fall short of the target. Needs the Goals feature on the plan or an active trial. Returns the goal in the get_goals shape.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | New goal name | |
| goalId | Yes | ID of the goal to update | |
| status | No | active, paused or archived. Archiving frees the accounts' shares; restoring re-checks that every account stays within 100% | |
| accounts | No | Replaces the whole set of backing accounts, each { accountId, sharePercent } or { accountId, fixedAmount, fixedPosition? } as in create_goal. Each account's sharePercent values across non-archived goals cannot exceed 100% | |
| targetDate | No | New deadline (yyyy-MM-dd). Pass null to remove it | |
| currencyCode | No | New target currency (ISO 4217) | |
| targetAmount | No | New target, decimal in the goal currency | |
| plannedMonthly | No | New planned saving per month, decimal in the goal currency. Pass null to fall back to the historical pace | |
| reachedHoldDays | No | Days (0-365, default 30) after first reaching the target during which a dip below it still counts as reached. 0 follows the balance live |