Currently viewing the AI version
Switch to human version

YNAB API Technical Reference

Configuration

Authentication Setup

  • Personal Tokens (5-minute setup): Generate at YNAB settings, never expires
  • OAuth 2.0 (30-minute setup): Required for multi-user apps, starts with 25-user limit until manual approval
  • Base URL: https://api.ynab.com/v1
  • Response Format: JSON wrapped in data object

Rate Limits

  • Limit: 200 requests/hour (rolling window)
  • Failure Mode: 429 error when exceeded
  • Development Impact: Easy to hit during debugging (10-minute cycles)
  • Mitigation: Use delta sync and response caching

Critical Warnings

Milliunits Conversion

  • Format: All currency amounts multiplied by 1000
  • Example: $50.00 = 50000 milliunits
  • Reason: Prevents JavaScript floating-point calculation errors
  • Production Failure: Forgetting conversion shows amounts 1000x too large

Subscription Dependencies

  • Requirement: Active YNAB subscription ($109/year as of 2025)
  • Failure Mode: Immediate 403 errors when subscription lapses
  • Error Response: "subscription_lapsed" in error message
  • Impact: Users assume app is broken, not subscription issue

Date Format Requirements

  • Format: ISO format (YYYY-MM-DD) only
  • Failure Mode: Transactions fail silently with incorrect dates
  • Library Recommendation: Use date-fns (Moment.js deprecated)

Resource Requirements

Time Investment

  • Personal Token Setup: 5 minutes
  • OAuth Implementation: 2 hours including testing
  • API Debugging: Rate limit hits cause frequent delays

Expertise Requirements

  • Basic REST API knowledge: Standard JSON responses
  • Financial data handling: Understanding of milliunits conversion
  • Error handling: YNAB provides useful error messages (not generic 500s)

Technical Specifications

API Capabilities

  • CRUD Operations: Full create, read, update, delete on transactions
  • Data Access: Budgets, accounts, categories, transactions, payees
  • Limitation: Cannot delete categories via API (manual YNAB action required)
  • Delta Sync: Returns only changed data since last request

Performance Thresholds

  • Rate Limit: 200/hour sufficient for most personal projects
  • Polling Frequency: Every 5 minutes approaches rate limit danger
  • Response Headers: Include remaining request count

Official SDKs

  • JavaScript (npm): Browser + Node.js, TypeScript definitions
  • Ruby (gem): Auto-handles auth headers
  • Python (PyPI): Python 3.8+ required

Decision Criteria

YNAB API vs Alternatives

Criteria YNAB API PocketSmith API Tiller
Setup Complexity Personal tokens: 5 min
OAuth: 30 min
OAuth-only: 30+ min Google Sheets auth: 2+ hours
Write Capabilities Full CRUD Read-only Complex spreadsheet writes
Cost $109/year (need YNAB) $10-19/month $79/year
Bank Connections Sync for YNAB (EU focus) Global coverage Manual/scripted
Best For Existing YNAB users Multi-currency needs Spreadsheet flexibility

When to Choose YNAB API

  • Already using YNAB for budgeting
  • Need automation of budget data
  • Building personal finance tools
  • Prefer zero-based budgeting methodology

When to Avoid

  • Need multi-currency support
  • Require real-time webhooks (polling only)
  • Building for non-YNAB users

Common Failure Scenarios

Development Issues

  • Rate Limit Debugging: Hitting 200/hour during development cycles
  • Milliunit Display: Amounts appear 1000x larger in UI
  • Silent Transaction Failures: Incorrect date formats cause no error messages
  • Category Management: Cannot delete categories programmatically

Production Failures

  • Subscription Lapses: Immediate API access loss, users blame app
  • Date Format Errors: Half of transaction imports fail randomly
  • Authentication Errors: 401 responses indicate wrong token format

Testing and Validation

Debug Tools

  • Interactive Docs: api.ynab.com/v1 with built-in testing
  • Error Messages: Specific, actionable error descriptions
  • Status Monitoring: ynabstatus.com for API health

Test Command

curl -H "Authorization: Bearer YOUR_TOKEN" \
  "https://api.ynab.com/v1/budgets"
  • Success: JSON with budget data
  • Failure: 401 indicates token issues

Community Resources

Actively Maintained Tools

Quality Indicators

  • Official SDKs: Reliable, regularly updated
  • Community Libraries: Variable quality, check maintenance status
  • Third-party Apps: 30+ in official showcase, most are demos or abandoned

Implementation Guidance

Best Practices

  • Use delta sync to minimize requests
  • Cache API responses during development
  • Handle subscription lapse errors gracefully
  • Convert milliunits for display (divide by 1000)
  • Use official SDKs instead of raw HTTP calls

Avoid These Mistakes

  • Polling every few minutes (rate limit risk)
  • Displaying raw milliunit values
  • Assuming categories can be deleted via API
  • Using deprecated date libraries (Moment.js)
  • Building OAuth when personal tokens suffice

Useful Links for Further Investigation

Links That Actually Matter

LinkDescription
YNAB API DocsThe actual API reference. Interactive swagger docs that work in your browser - way better than most API docs.
Interactive API ExplorerTest API calls right in your browser. Plug in your token and start clicking around. Faster than setting up Postman.
Generate Your API TokenGo here, click "New Token", done. Takes 30 seconds.
Official Starter KitReact app showing OAuth flow. Only useful if you need OAuth - personal tokens are easier.
JavaScript SDKWorks in browsers and Node. TypeScript definitions included. Just use this instead of raw HTTP calls.
npmThe official npm package for the YNAB JavaScript SDK, providing easy installation and integration into your projects.
Ruby GemClean Ruby interface for the YNAB API. Handles authentication headers automatically, simplifying API interactions for Ruby developers.
RubyGemsThe official RubyGems page for the YNAB Ruby SDK, allowing easy installation and management of the gem in Ruby applications.
Python PackagePython 3.6+ support, but I'd use 3.8+ because 3.6 is ancient. Async/await compatible. Good examples in the repo.
PyPIThe official PyPI page for the YNAB Python SDK, enabling straightforward installation and integration into Python projects.
Awesome YNAB ListCurated list of community projects. Quality varies but it's a good starting point.
Works with YNAB ShowcaseOfficial directory of 30+ third-party apps. These are the ones that actually work and get users.
Toolkit for YNABBrowser extension that adds missing features. Good example of what's possible with the API.
Bank2YNABCSV converter for US banks. Open source and regularly updated.
Sync for YNABEuropean bank import service. Way better than manual CSV uploads.
API Status PageCheck if YNAB's API is having issues. Bookmark this for when your app randomly stops working.
YNAB SupportGeneral support. For API-specific issues, just email api@ynab.com directly.
API Launch Blog PostFrom 2018 when the API launched. Explains the why behind their design decisions.
YNAB's OpenAPI PostTechnical details about how they built their API docs. Interesting if you're into that.
OAuth 2.0 SpecOnly read this if you're implementing OAuth and hate yourself. The YNAB starter kit is easier.
YNAB Questions on Stack OverflowTechnical questions and developer discussions about YNAB API integration and usage. Search here first before asking new questions.
YNAB on Personal Finance Stack ExchangeGeneral YNAB usage questions and budgeting discussions. Good for understanding how people actually use the software.
GitHub IssuesIssues in the official YNAB repos. Good place to see what's broken or request features.
YNAB DiscordUnofficial Discord server with an API discussion channel. Faster responses than email support.

Related Tools & Recommendations

compare
Recommended

Stripe vs Plaid vs Dwolla - The 3AM Production Reality Check

Comparing a race car, a telescope, and a forklift - which one moves money?

Stripe
/compare/stripe/plaid/dwolla/production-reality-check
100%
tool
Recommended

Zapier - Connect Your Apps Without Coding (Usually)

integrates with Zapier

Zapier
/tool/zapier/overview
65%
review
Recommended

Zapier Enterprise Review - Is It Worth the Insane Cost?

I've been running Zapier Enterprise for 18 months. Here's what actually works (and what will destroy your budget)

Zapier
/review/zapier/enterprise-review
65%
integration
Recommended

Claude Can Finally Do Shit Besides Talk

Stop copying outputs into other apps manually - Claude talks to Zapier now

Anthropic Claude
/integration/claude-zapier/mcp-integration-overview
65%
tool
Recommended

Pipedream - Zapier With Actual Code Support

Finally, a workflow platform that doesn't treat developers like idiots

Pipedream
/tool/pipedream/overview
59%
tool
Recommended

Plaid - The Fintech API That Actually Ships

competes with Plaid

Plaid
/tool/plaid/overview
59%
alternatives
Recommended

Plaid Alternatives - The Migration Reality Check

What to do when Plaid is bleeding your startup dry at $3,200/month

Plaid
/alternatives/plaid/migration-reality-check
59%
tool
Popular choice

Sift - Fraud Detection That Actually Works

The fraud detection service that won't flag your biggest customer while letting bot accounts slip through

Sift
/tool/sift/overview
59%
news
Popular choice

GPT-5 Is So Bad That Users Are Begging for the Old Version Back

OpenAI forced everyone to use an objectively worse model. The backlash was so brutal they had to bring back GPT-4o within days.

GitHub Copilot
/news/2025-08-22/gpt5-user-backlash
57%
integration
Recommended

Stop Stripe from Destroying Your Serverless Performance

Cold starts are killing your payments, webhooks are timing out randomly, and your users think your checkout is broken. Here's how to fix the mess.

Stripe
/integration/stripe-nextjs-app-router/serverless-performance-optimization
54%
integration
Recommended

Supabase + Next.js + Stripe: How to Actually Make This Work

The least broken way to handle auth and payments (until it isn't)

Supabase
/integration/supabase-nextjs-stripe-authentication/customer-auth-payment-flow
54%
news
Recommended

Hackers Are Now Exploiting Gmail's AI to Deliver Undetectable Phishing

New prompt injection attacks target AI email scanners, turning Google's security systems into accomplices

Technology News Aggregation
/news/2025-08-24/gmail-ai-prompt-injection
48%
tool
Recommended

Signicat Mint API - European Identity Verification That Actually Works

The only API that handles BankID, MitID, and 35+ other European eID methods without making you want to quit programming.

Signicat Mint API
/tool/signicat-mint-api/overview
47%
tool
Recommended

Signicat Mint API - Integration Hell Survival Guide

Stop clicking through their UI like a peasant - automate your identity workflows with the Mint API

mintapi
/tool/mint-api/integration-troubleshooting
47%
tool
Recommended

Jsonnet - Stop Copy-Pasting YAML Like an Animal

Because managing 50 microservice configs by hand will make you lose your mind

Jsonnet
/tool/jsonnet/overview
44%
tool
Recommended

Git Restore - Finally, a File Command That Won't Destroy Your Work

Stop using git checkout to restore files - git restore actually does what you expect

Git Restore
/tool/git-restore/overview
44%
news
Recommended

US Revokes Chip Export Licenses for TSMC, Samsung, SK Hynix

When Bureaucrats Decide Your $50M/Month Fab Should Go Idle

rest
/news/2025-09-03/us-chip-export-restrictions
44%
howto
Recommended

Build REST APIs in Gleam That Don't Crash in Production

built on Gleam

Gleam
/howto/setup-gleam-production-deployment/rest-api-development
44%
tool
Recommended

Anthropic Python SDK - Actually works

extended by Anthropic Python SDK

Anthropic Python SDK
/tool/anthropic-python-sdk/overview
44%
tool
Recommended

MCP Python SDK - Stop Writing the Same Database Connector 50 Times

extended by MCP Python SDK

MCP Python SDK
/tool/mcp-python-sdk/overview
44%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization