create_transaction
Create a YNAB transaction with amount, date, payee, category, memo, and optional split subtransactions. Supports dry-run validation before posting.
Instructions
Create a transaction in YNAB.
Args: account_id: Account UUID. amount: Dollar amount ("-42.50" for outflow, "100.00" for inflow). date: Transaction date (YYYY-MM-DD). payee_name: Payee name (YNAB auto-creates new payees). payee_id: Payee UUID, including an account transfer payee ID. category_id: Category UUID. Omit when splitting. memo: Transaction memo. cleared: "cleared", "uncleared", or "reconciled". approved: Whether the transaction is approved. subtransactions_json: JSON array of split legs, to record one card charge against several categories. Each element: {"amount", "category_id"?, "payee_name"?, "payee_id"?, "memo"?}. Amounts are dollars with the same sign as the parent (e.g. "-30.00") and must sum to it. Needs at least two legs, and category_id must be left off the parent. budget_id: Budget ID. Defaults to last-used budget. dry_run: Validate and preview without creating.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| memo | No | ||
| amount | Yes | ||
| cleared | No | ||
| dry_run | No | ||
| approved | No | ||
| payee_id | No | ||
| budget_id | No | ||
| account_id | Yes | ||
| payee_name | No | ||
| category_id | No | ||
| subtransactions_json | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |