create_transaction
Add a new financial transaction to your YNAB budget by specifying account, date, amount, and optional details like payee, category, and memo.
Instructions
Create a new transaction.
Args:
budget_id: The ID of the budget (use 'last-used' for default budget)
account_id: The account ID for this transaction
date: Transaction date in YYYY-MM-DD format
amount: Transaction amount (positive for inflow, negative for outflow)
payee_name: Name of the payee (optional)
category_id: Category ID (optional)
memo: Transaction memo (optional)
cleared: Cleared status - 'cleared', 'uncleared', or 'reconciled' (default: 'uncleared')
approved: Whether the transaction is approved (default: False)
Returns:
JSON string with the created transaction
Input Schema
Name | Required | Description | Default |
---|---|---|---|
account_id | Yes | ||
amount | Yes | ||
approved | No | ||
budget_id | Yes | ||
category_id | No | ||
cleared | No | uncleared | |
date | Yes | ||
memo | No | ||
payee_name | No |
Input Schema (JSON Schema)
{
"properties": {
"account_id": {
"title": "Account Id",
"type": "string"
},
"amount": {
"title": "Amount",
"type": "number"
},
"approved": {
"default": false,
"title": "Approved",
"type": "boolean"
},
"budget_id": {
"title": "Budget Id",
"type": "string"
},
"category_id": {
"default": null,
"title": "Category Id",
"type": "string"
},
"cleared": {
"default": "uncleared",
"title": "Cleared",
"type": "string"
},
"date": {
"title": "Date",
"type": "string"
},
"memo": {
"default": null,
"title": "Memo",
"type": "string"
},
"payee_name": {
"default": null,
"title": "Payee Name",
"type": "string"
}
},
"required": [
"budget_id",
"account_id",
"date",
"amount"
],
"type": "object"
}