Skip to content

Reference: Transactions

The largest group — browsing, creating, updating, and deleting the individual money movements on an account. A few tools are worth calling out:

  • Splits. create_transaction and bulk_create_transactions accept a subtransactions array to split one transaction across several categories (e.g. a Target run that’s half groceries, half household). Set the parent category_id to null and make the leg amounts sum to the parent amount. YNAB only supports splitting on create — there’s no API to change a split’s legs after the fact.
  • Duplicates. find_duplicate_transactions finds candidates (same account, amount, and date) and returns them for review. It never deletes anything; pair it with delete_transaction once you’ve confirmed which one is the duplicate.
  • Bulk operations. bulk_update_transactions and bulk_create_transactions do many transactions in one API call — prefer them over a loop of single calls, both for speed and because the YNAB API is rate-limited to 200 requests/hour.
  • Import. import_transactions triggers a refresh on accounts already bank-linked in the YNAB app. It cannot create that link — see Accounts.

Create MANY transactions in one call (POST array). Each item needs account_id, date, amount; optional category_id, payee, memo, import_id, and subtransactions[] for splits. Returns created ids + any duplicate_import_ids.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
transactions array of object (account_id, date, amount, import_id, subtransactions, payee_id, payee_name, category_id, memo, cleared, approved, flag_color)

YNAB API

Update many transactions in ONE call (the efficient way to categorize and/or approve a batch). Each update needs an id.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
updates array of object (id, payee_id, payee_name, category_id, memo, cleared, approved, flag_color) Per-transaction updates; each item needs id plus the fields to change.

YNAB API

Transaction history for one category (drill-down for spending habits).

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
category_id string
since_date string
until_date string
type enum: uncategorized | unapproved
last_knowledge_of_server number

YNAB API

Create a transaction. amount is milliunits (negative = outflow). For a SPLIT across categories (e.g. a mixed Walmart/Target/Amazon receipt), set category_id to null and pass subtransactions whose amounts sum to amount; optionally set import_id so it matches the later bank-imported transaction. YNAB supports splits only on create — the leg breakdown of an existing split cannot be edited via the API.

**Milliunits:** `amount` — 1000 = one currency unit.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
account_id string
date string ISO date, e.g. 2026-06-08.
amount number Milliunits; negative outflow, positive inflow.
import_id string Optional dedupe/match key so a later bank import reconciles to this txn.
subtransactions array of object (amount, category_id, payee_id, payee_name, memo) Split legs. Set the parent category_id to null; leg amounts must sum to amount.
payee_id string
payee_name string
category_id string null clears the category (uncategorize).
memo string
cleared enum: cleared | uncleared | reconciled
approved boolean
flag_color enum: red | orange | yellow | green | blue | purple

YNAB API

Delete a transaction by id (use after confirming a duplicate).

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
transaction_id string

YNAB API

Find candidate duplicate transactions (same account + amount + date). Returns clusters for review — does NOT delete. Pair with delete_transaction.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
account_id string
since_date string

YNAB API

Get one transaction by id.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
transaction_id string

YNAB API

Trigger direct import on accounts already bank-linked in the YNAB app (pull latest bank activity). Returns newly imported transaction ids. Cannot create the link itself.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.

YNAB API

List transactions. Optionally scope to an account, a since_date, or a type filter (uncategorized/unapproved).

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
account_id string
since_date string
until_date string
type enum: uncategorized | unapproved
last_knowledge_of_server number
max_results number

YNAB API

List transactions for a specific budget month.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
month string ISO month or “current”. Defaults to current.
since_date string
until_date string
type enum: uncategorized | unapproved
last_knowledge_of_server number

YNAB API

Transaction history for one payee (drill-down for spending habits).

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
payee_id string
since_date string
until_date string
type enum: uncategorized | unapproved
last_knowledge_of_server number

YNAB API

Aggregate spending by category or payee over a date range — totals, units, and counts per group. Cheaper than listing every row.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
group_by enum: category | payee
account_id string
since_date string
until_date string

YNAB API

Update fields on an existing transaction (only provided fields change).

**Milliunits:** `amount` — 1000 = one currency unit.

Parameters

Name Type Required Description
budget_id string Budget id or alias (“last-used”, “default”). Defaults to YNAB_BUDGET_ID.
transaction_id string
date string
amount number Milliunits.
payee_id string
payee_name string
category_id string null clears the category (uncategorize).
memo string
cleared enum: cleared | uncleared | reconciled
approved boolean
flag_color enum: red | orange | yellow | green | blue | purple

YNAB API