Current Version
The current SDK version is v5.11.1. This package requires:- Node.js: >= 18
- TypeScript (optional): >= 5.9
Version Compatibility
Due to backwards-incompatible changes across Notion API versions, certain SDK versions require minimum API versions:| SDK Version | Minimum API Version |
|---|---|
| v4.0.0 and above | 2022-06-28 |
| v5.0.0 and above | 2025-09-03 |
Upgrading to v5.x
Breaking Changes
Minimum API Version Requirement
Version 5.0.0 requires Notion API version 2025-09-03 or later. The SDK defaults to this version automatically. Before (v4.x):New Node.js Requirement
The minimum supported Node.js version is 18 (previously it was lower). Ensure your runtime environment meets this requirement.New Features in v5.x
Automatic Retry Configuration
Version 5.x includes enhanced automatic retry capabilities with configurable options:Data Sources API
Version 5.x adds support for the Data Sources API:Migration Checklist
When upgrading to v5.x:- Verify Node.js version is >= 18
- Update your Notion API version to 2025-09-03 (or explicitly set
notionVersionin Client options) - Test all API calls to ensure compatibility with the new API version
- Review and update TypeScript types if using TypeScript >= 5.9
- Update any custom retry logic to use the new
retryconfiguration option - Test error handling with the updated retry behavior
Upgrading to v4.x
Breaking Changes
Minimum API Version Requirement
Version 4.0.0 introduced a requirement for Notion API version 2022-06-28 or later.If you’re currently on v3.x or earlier, first upgrade your API version header before upgrading the SDK to avoid unexpected behavior.
Migration Strategy
-
Update API Version First
- Test Your Application Run comprehensive tests with the new API version before upgrading the SDK package.
-
Upgrade the SDK
-
Remove Explicit API Version (optional)
Once you’ve verified everything works, you can remove the explicit
notionVersionsetting as v4.x defaults to 2022-06-28.
Common Migration Issues
Type Errors After Upgrading
If you encounter TypeScript errors after upgrading:- Ensure your TypeScript version meets the minimum requirement (>= 5.9 for latest SDK)
- Clear your
node_modulesandpackage-lock.json, then reinstall: - Regenerate type declarations if using custom build configurations
API Response Changes
Different Notion API versions may return different response structures. Always consult the Notion API changelog when upgrading API versions.Deprecation Warnings
If you see deprecation warnings in your logs:- Review the Notion API versioning documentation
- Update your code to use the recommended alternatives
- Test thoroughly before deploying to production
Getting Help
If you encounter issues during migration:- Review the Notion API changelog
- Check the GitHub repository for known issues
- Contact Notion developers at
[email protected]
Next Steps
API Versions
Learn about API version compatibility and configuration
Client Configuration
Explore all available Client configuration options