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
- Sync for YNAB: European bank import
- Bank2YNAB: US bank CSV converter
- Toolkit for YNAB: Browser extension for missing features
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
Link | Description |
---|---|
YNAB API Docs | The actual API reference. Interactive swagger docs that work in your browser - way better than most API docs. |
Interactive API Explorer | Test API calls right in your browser. Plug in your token and start clicking around. Faster than setting up Postman. |
Generate Your API Token | Go here, click "New Token", done. Takes 30 seconds. |
Official Starter Kit | React app showing OAuth flow. Only useful if you need OAuth - personal tokens are easier. |
JavaScript SDK | Works in browsers and Node. TypeScript definitions included. Just use this instead of raw HTTP calls. |
npm | The official npm package for the YNAB JavaScript SDK, providing easy installation and integration into your projects. |
Ruby Gem | Clean Ruby interface for the YNAB API. Handles authentication headers automatically, simplifying API interactions for Ruby developers. |
RubyGems | The official RubyGems page for the YNAB Ruby SDK, allowing easy installation and management of the gem in Ruby applications. |
Python Package | Python 3.6+ support, but I'd use 3.8+ because 3.6 is ancient. Async/await compatible. Good examples in the repo. |
PyPI | The official PyPI page for the YNAB Python SDK, enabling straightforward installation and integration into Python projects. |
Awesome YNAB List | Curated list of community projects. Quality varies but it's a good starting point. |
Works with YNAB Showcase | Official directory of 30+ third-party apps. These are the ones that actually work and get users. |
Toolkit for YNAB | Browser extension that adds missing features. Good example of what's possible with the API. |
Bank2YNAB | CSV converter for US banks. Open source and regularly updated. |
Sync for YNAB | European bank import service. Way better than manual CSV uploads. |
API Status Page | Check if YNAB's API is having issues. Bookmark this for when your app randomly stops working. |
YNAB Support | General support. For API-specific issues, just email api@ynab.com directly. |
API Launch Blog Post | From 2018 when the API launched. Explains the why behind their design decisions. |
YNAB's OpenAPI Post | Technical details about how they built their API docs. Interesting if you're into that. |
OAuth 2.0 Spec | Only read this if you're implementing OAuth and hate yourself. The YNAB starter kit is easier. |
YNAB Questions on Stack Overflow | Technical questions and developer discussions about YNAB API integration and usage. Search here first before asking new questions. |
YNAB on Personal Finance Stack Exchange | General YNAB usage questions and budgeting discussions. Good for understanding how people actually use the software. |
GitHub Issues | Issues in the official YNAB repos. Good place to see what's broken or request features. |
YNAB Discord | Unofficial Discord server with an API discussion channel. Faster responses than email support. |
Related Tools & Recommendations
Stripe vs Plaid vs Dwolla - The 3AM Production Reality Check
Comparing a race car, a telescope, and a forklift - which one moves money?
Zapier - Connect Your Apps Without Coding (Usually)
integrates with Zapier
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)
Claude Can Finally Do Shit Besides Talk
Stop copying outputs into other apps manually - Claude talks to Zapier now
Pipedream - Zapier With Actual Code Support
Finally, a workflow platform that doesn't treat developers like idiots
Plaid - The Fintech API That Actually Ships
competes with Plaid
Plaid Alternatives - The Migration Reality Check
What to do when Plaid is bleeding your startup dry at $3,200/month
Sift - Fraud Detection That Actually Works
The fraud detection service that won't flag your biggest customer while letting bot accounts slip through
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.
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.
Supabase + Next.js + Stripe: How to Actually Make This Work
The least broken way to handle auth and payments (until it isn't)
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
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 - Integration Hell Survival Guide
Stop clicking through their UI like a peasant - automate your identity workflows with the Mint API
Jsonnet - Stop Copy-Pasting YAML Like an Animal
Because managing 50 microservice configs by hand will make you lose your mind
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
US Revokes Chip Export Licenses for TSMC, Samsung, SK Hynix
When Bureaucrats Decide Your $50M/Month Fab Should Go Idle
Build REST APIs in Gleam That Don't Crash in Production
built on Gleam
Anthropic Python SDK - Actually works
extended by Anthropic Python SDK
MCP Python SDK - Stop Writing the Same Database Connector 50 Times
extended by MCP Python SDK
Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization