create_transaction
Create a new transaction in YNAB with specified account, date, amount, optional category, payee, memo, and split support.
Instructions
Create a new transaction. Future-dated transactions are not permitted (use scheduled transactions instead).
Args: plan_id: The plan ID (use list_plans to find available IDs) account_id: The account ID for this transaction date: Transaction date in YYYY-MM-DD format (must not be in the future) amount: Amount in dollars (negative for outflow, positive for inflow). e.g. -50.25 for spending $50.25 payee_id: Payee ID (use list_payees to find available IDs). For account transfers, use the target account's transfer_payee_id. payee_name: Payee name. If payee_id is null, this resolves to an existing payee or creates a new one. category_id: Category ID. Use null with subtransactions to create a split. Credit Card Payment categories are ignored. memo: Memo/note (max 500 chars) cleared: 'cleared', 'uncleared', or 'reconciled' approved: Whether the transaction is approved flag_color: 'red', 'orange', 'yellow', 'green', 'blue', 'purple', or null import_id: Unique import identifier (max 36 chars). Used for matching against imported transactions. subtransactions: For splits, an array of dicts with keys: amount (dollars, required), payee_id, payee_name, category_id, memo exclude_fields: Optional list of field names to exclude from the response. If omitted, the model's default exclude list is used (see FIELDS.md). Pass [] to return all fields. Pass a custom list to override the default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | ||
| memo | No | ||
| amount | Yes | ||
| cleared | No | uncleared | |
| plan_id | Yes | ||
| approved | No | ||
| payee_id | No | ||
| import_id | No | ||
| account_id | Yes | ||
| flag_color | No | ||
| payee_name | No | ||
| category_id | No | ||
| exclude_fields | No | ||
| subtransactions | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |