Create a savings goal
create_savings_goalAdds- What it does
- Adds a new record and leaves what you had alone.
- Permission
- Savings goals, change
goals:write
What your assistant is told
Create a new savings goal for the calling user — the target they're saving toward, e.g. a "€3,000 emergency fund". name is what the user calls it; target_minor is the goal amount in integer minor units (cents, > 0) — €3,000 is 300000; currency is 3-letter ISO; target_date_iso is an OPTIONAL deadline as "YYYY-MM-DD". Returns the created goal including its id, which then feeds log_savings_deposit (put money in) and get_savings_goal_progress (see how close they are). This is the first step of the lifecycle: create_savings_goal → log_savings_deposit → get_savings_goal_progress. It starts at a current total of 0 — do NOT preload deposits here. NOTE: this is NOT deduplicated (two goals can share a name), so confirm the goal with the user before creating, and check get_savings_goal_progress before retrying rather than calling again.
Parameters
nametext, requiredGoal name as the user would say it, e.g. "Emergency fund".targetMinorwhole number, requiredTarget amount in integer minor units (cents). Must be > 0. €3,000 → 300000.currencytext, required3-letter ISO 4217 currency code, e.g. "EUR".targetDateIsotext, optionalOptional target date as "YYYY-MM-DD". Omit if there is no deadline.