User1
The currently authenticated user
GET/userGet user
Responses| Status | Description | Schema |
|---|
200 | The user info | UserResponse |
Plans3
Plans are the top-level container for your YNAB data; accounts, categories, payees, and transactions all belong to a plan. Most endpoints require a plan_id, which can be obtained from "Get all plans". Alternatively, "last-used" can be used in place of a plan_id to specify the most recently used plan, and "default" can be used if [default plan selection](https://api.ynab.com/#oauth-default-plan) is enabled.
GET/plansGet all plans
Parameters| Name | In | Required | Type |
|---|
include_accounts | query | no | boolean |
Responses| Status | Description | Schema |
|---|
200 | The list of plans | PlanSummaryResponse |
404 | No plans were found | ErrorResponse |
GET/plans/{plan_id}Get a plan
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The requested plan | PlanDetailResponse |
404 | The specified plan was not found | ErrorResponse |
GET/plans/{plan_id}/settingsGet plan settings
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested plan settings | PlanSettingsResponse |
404 | The specified plan was not found | ErrorResponse |
Accounts3
The accounts for a plan. Every transaction belongs to an account, and an account is either "on budget", where its activity is categorized and planned, or a tracking account, where only its balance is tracked (see the on_budget flag).
GET/plans/{plan_id}/accountsGet all accounts
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested accounts | AccountsResponse |
404 | No accounts were found | ErrorResponse |
POST/plans/{plan_id}/accountsCreate an account
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostAccountWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The account was successfully created | AccountResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
GET/plans/{plan_id}/accounts/{account_id}Get an account
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
account_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested account | AccountResponse |
404 | The requested account was not found | ErrorResponse |
Categories8
The categories for a plan, organized into category groups. Category amounts (assigned, activity, available) are specific to a month, and can be read and updated through the month-scoped category endpoints.
GET/plans/{plan_id}/categoriesGet all categories
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The categories grouped by category group | CategoriesResponse |
404 | No categories were found | ErrorResponse |
POST/plans/{plan_id}/categoriesCreate a category
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostCategoryWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The category was successfully created | SaveCategoryResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
GET/plans/{plan_id}/categories/{category_id}Get a category
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
category_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested category | CategoryResponse |
404 | The category was not found | ErrorResponse |
PATCH/plans/{plan_id}/categories/{category_id}Update a category
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
category_id | path | yes | string |
Request bodyapplication/json — PatchCategoryWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The category was successfully updated | SaveCategoryResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
POST/plans/{plan_id}/category_groupsCreate a category group
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostCategoryGroupWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The category group was successfully created | SaveCategoryGroupResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
PATCH/plans/{plan_id}/category_groups/{category_group_id}Update a category group
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
category_group_id | path | yes | string |
Request bodyapplication/json — PatchCategoryGroupWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The category group was successfully updated | SaveCategoryGroupResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
GET/plans/{plan_id}/months/{month}/categories/{category_id}Get a category for a specific plan month
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
category_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested month category | CategoryResponse |
404 | The month category was not was found | ErrorResponse |
PATCH/plans/{plan_id}/months/{month}/categories/{category_id}Update a category for a specific month
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
category_id | path | yes | string |
Request bodyapplication/json — PatchMonthCategoryWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The month category was successfully updated | SaveCategoryResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
Payees4
The payees for a plan. Transfers between accounts are represented with special transfer payees; a payee with transfer_account_id set is the transfer payee for that account.
GET/plans/{plan_id}/payeesGet all payees
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The requested list of payees | PayeesResponse |
404 | No payees were found | ErrorResponse |
POST/plans/{plan_id}/payeesCreate a payee
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostPayeeWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The payee was successfully created | SavePayeeResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
GET/plans/{plan_id}/payees/{payee_id}Get a payee
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
payee_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested payee | PayeeResponse |
404 | The payee was not found | ErrorResponse |
PATCH/plans/{plan_id}/payees/{payee_id}Update a payee
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
payee_id | path | yes | string |
Request bodyapplication/json — PatchPayeeWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The payee was successfully updated | SavePayeeResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
Payee Locations3
When you enter a transaction and specify a payee on the YNAB mobile apps, the GPS coordinates for that location are stored, with your permission, so that the next time you are in the same place (like the Grocery store) we can pre-populate nearby payees for you! It’s handy and saves you time. This resource makes these locations available. Locations will not be available for all payees.
GET/plans/{plan_id}/payee_locationsGet all payee locations
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of payee locations | PayeeLocationsResponse |
404 | No payees locations were found | ErrorResponse |
GET/plans/{plan_id}/payee_locations/{payee_location_id}Get a payee location
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
payee_location_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The payee location | PayeeLocationResponse |
404 | The payee location was not found | ErrorResponse |
GET/plans/{plan_id}/payees/{payee_id}/payee_locationsGet all locations for a payee
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
payee_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of requested payee locations | PayeeLocationsResponse |
404 | No payees locations were found | ErrorResponse |
Months2
Each plan contains one or more months, which is where Ready to Assign, Age of Money and category (assigned / activity / available) amounts are available.
GET/plans/{plan_id}/monthsGet all plan months
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of plan months | MonthSummariesResponse |
404 | No plan months were found | ErrorResponse |
GET/plans/{plan_id}/months/{month}Get a plan month
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The plan month detail | MonthDetailResponse |
404 | The plan month was not found | ErrorResponse |
Money Movements4
Money movements record money moved between two categories, or between a category and Ready to Assign, within a plan month. Movements performed together as a single action are linked by a money movement group.
GET/plans/{plan_id}/money_movement_groupsGet all money movement groups
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of requested money movement groups | MoneyMovementGroupsResponse |
404 | No money movement groups were found | ErrorResponse |
GET/plans/{plan_id}/money_movementsGet all money movements
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of requested money movements | MoneyMovementsResponse |
404 | No money movements were found | ErrorResponse |
GET/plans/{plan_id}/months/{month}/money_movement_groupsGet money movement groups for a plan month
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of requested money movement groups | MoneyMovementGroupsResponse |
404 | No money movement groups were found | ErrorResponse |
GET/plans/{plan_id}/months/{month}/money_movementsGet money movements for a plan month
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The list of requested money movements | MoneyMovementsResponse |
404 | No money movements were found | ErrorResponse |
Transactions11
The transactions for a plan. Transaction amounts are specified in [milliunits format](https://api.ynab.com/#formats). Split transactions are represented with subtransactions, and transfers between accounts are represented with transfer payees.
GET/plans/{plan_id}/accounts/{account_id}/transactionsGet account transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
account_id | path | yes | string |
since_date | query | no | string |
until_date | query | no | string |
type | query | no | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested transactions | TransactionsResponse |
404 | No transactions were found | ErrorResponse |
GET/plans/{plan_id}/categories/{category_id}/transactionsGet category transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
category_id | path | yes | string |
since_date | query | no | string |
until_date | query | no | string |
type | query | no | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested transactions | HybridTransactionsResponse |
404 | No transactions were found | ErrorResponse |
GET/plans/{plan_id}/months/{month}/transactionsGet plan month transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
month | path | yes | string |
since_date | query | no | string |
until_date | query | no | string |
type | query | no | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested transactions | TransactionsResponse |
404 | No transactions were found | ErrorResponse |
GET/plans/{plan_id}/payees/{payee_id}/transactionsGet payee transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
payee_id | path | yes | string |
since_date | query | no | string |
until_date | query | no | string |
type | query | no | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested transactions | HybridTransactionsResponse |
404 | No transactions were found | ErrorResponse |
GET/plans/{plan_id}/transactionsGet transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
since_date | query | no | string |
until_date | query | no | string |
type | query | no | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested transactions | TransactionsResponse |
400 | An error occurred | ErrorResponse |
404 | No transactions were found | ErrorResponse |
POST/plans/{plan_id}/transactionsCreate a single transaction or multiple transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostTransactionsWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The transaction or transactions were successfully created | SaveTransactionsResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
409 | A transaction on the same account with the same `import_id` already exists. | ErrorResponse |
PATCH/plans/{plan_id}/transactionsUpdate multiple transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PatchTransactionsWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The transactions were successfully updated | SaveTransactionsResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
POST/plans/{plan_id}/transactions/importImport transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The request was successful but there were no transactions to import | TransactionsImportResponse |
201 | One or more transactions were imported successfully | TransactionsImportResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
GET/plans/{plan_id}/transactions/{transaction_id}Get a transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
transaction_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested transaction | TransactionResponse |
404 | The transaction was not found | ErrorResponse |
PUT/plans/{plan_id}/transactions/{transaction_id}Update a transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
transaction_id | path | yes | string |
Request bodyapplication/json — PutTransactionWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The transaction was successfully updated | TransactionResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
DELETE/plans/{plan_id}/transactions/{transaction_id}Delete a transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
transaction_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The transaction was successfully deleted | TransactionResponse |
404 | The transaction was not found | ErrorResponse |
Scheduled Transactions5
The scheduled transactions for a plan; upcoming and recurring transactions that have not yet been entered into an account. Each has a frequency along with the first and next dates it will occur (date_first and date_next).
GET/plans/{plan_id}/scheduled_transactionsGet all scheduled transactions
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
last_knowledge_of_server | query | no | integer |
Responses| Status | Description | Schema |
|---|
200 | The list of requested scheduled transactions | ScheduledTransactionsResponse |
404 | No scheduled transactions were found | ErrorResponse |
POST/plans/{plan_id}/scheduled_transactionsCreate a scheduled transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
Request bodyapplication/json — PostScheduledTransactionWrapper (required)
Responses| Status | Description | Schema |
|---|
201 | The scheduled transaction was successfully created | ScheduledTransactionResponse |
400 | The request could not be understood due to malformed syntax or validation error(s). | ErrorResponse |
GET/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}Get a scheduled transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
scheduled_transaction_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The requested Scheduled Transaction | ScheduledTransactionResponse |
404 | The scheduled transaction was not found | ErrorResponse |
PUT/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}Update a scheduled transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
scheduled_transaction_id | path | yes | string |
Request bodyapplication/json — PutScheduledTransactionWrapper (required)
Responses| Status | Description | Schema |
|---|
200 | The scheduled transaction was successfully updated | ScheduledTransactionResponse |
400 | The request could not be understood due to malformed syntax or validation error(s) | ErrorResponse |
DELETE/plans/{plan_id}/scheduled_transactions/{scheduled_transaction_id}Delete a scheduled transaction
Parameters| Name | In | Required | Type |
|---|
plan_id | path | yes | string |
scheduled_transaction_id | path | yes | string |
Responses| Status | Description | Schema |
|---|
200 | The scheduled transaction was successfully deleted | ScheduledTransactionResponse |
404 | The scheduled transaction was not found | ErrorResponse |