create_transaction
Add a new transaction to your YNAB budget by specifying account, date, amount, payee, category, and optional details like memo or split transactions.
Instructions
Create a new transaction.
Args: account_id: The account UUID to create the transaction in. date: Transaction date in YYYY-MM-DD format. amount: Amount in milliunits (negative for outflows, positive for inflows). Example: -50000 = -$50.00 outflow, 150000 = $150.00 inflow. payee_name: Name of payee (creates new payee if doesn't exist). Use this OR payee_id. payee_id: UUID of existing payee. Use this OR payee_name. category_id: UUID of the budget category. Omit when using subtransactions (each sub has its own). memo: Transaction memo. cleared: Cleared status: "cleared", "uncleared", or "reconciled". Defaults to "cleared". approved: Whether the transaction is approved. Defaults to True. flag_color: Optional flag: red, orange, yellow, green, blue, purple. subtransactions: Array of subtransaction objects for split transactions. Each item: {"amount": int, "category_id": "uuid", "memo": "text", "payee_id": "uuid", "payee_name": "text"}. Only amount and category_id are required per sub. The sub amounts must sum to the parent amount. When using subtransactions, omit category_id on the parent (it becomes a split). budget_id: Budget ID (uses default if omitted).
Returns: Created transaction details with id, date, amount, payee, category, and subtransactions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account_id | Yes | ||
| date | Yes | ||
| amount | Yes | ||
| payee_name | No | ||
| payee_id | No | ||
| category_id | No | ||
| memo | No | ||
| cleared | No | cleared | |
| approved | No | ||
| flag_color | No | ||
| subtransactions | No | ||
| budget_id | No |