The Notion SDK for JavaScript is designed to work with specific versions of the Notion API. This guide explains version compatibility and how to configure API versions in your application.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/makenotion/notion-sdk-js/llms.txt
Use this file to discover all available pages before exploring further.
How API Versioning Works
Notion uses date-based API versioning to introduce new features and breaking changes. Each API version is identified by a date inYYYY-MM-DD format.
The SDK automatically includes the API version in every request via the Notion-Version header.
SDK and API Version Compatibility
Different SDK versions have different default and minimum API version requirements:| SDK Version | Default API Version | Minimum API Version |
|---|---|---|
| v3.x | Earlier versions | N/A |
| v4.0.0 and above | 2022-06-28 | 2022-06-28 |
| v5.0.0 and above | 2025-09-03 | 2025-09-03 |
Setting the API Version
You can explicitly set the Notion API version when initializing the Client:Using the Default Version
If you don’t specify anotionVersion, the SDK uses its default:
Client.defaultNotionVersion and changes with major SDK releases.
Why API Versions Matter
Breaking Changes
Notion may introduce breaking changes in new API versions, such as:- Modified response structures
- Renamed properties
- Changed validation rules
- Deprecated endpoints
New Features
Newer API versions include enhanced capabilities:- New endpoints (e.g., Data Sources API in 2025-09-03)
- Additional properties in responses
- Improved filtering and sorting options
Type Safety
The SDK’s TypeScript definitions are generated based on a specific API version. Using a different API version may cause:- Type mismatches
- Missing property definitions
- Incorrect return types
Incremental API Version Upgrades
When you need to upgrade your API version without upgrading the SDK, you can use a two-phase approach:Phase 1: Test with New API Version
Test all your API calls thoroughly with the new version before upgrading the SDK. Some responses may have different structures.
Phase 2: Upgrade the SDK
Once you’ve verified compatibility:notionVersion setting:
Downgrading API Versions
If you must use an older API version:- Use an older SDK version that supports that API version
- Pin your SDK version in
package.json:
Custom Requests with Different API Versions
If you need to make specific requests with a different API version, you can use custom headers:Checking Your Current API Version
To see which API version your Client is using:Version-Specific Considerations
API Version 2025-09-03
Requirements:- SDK v5.0.0 or higher
- Node.js 18 or higher
- Data Sources API support
- Enhanced query capabilities
- Improved error messages
- Review response type changes in the Notion API changelog
- Test pagination with new
has_morebehavior - Update any hard-coded property names that may have changed
API Version 2022-06-28
Requirements:- SDK v4.0.0 or higher
- Standard Pages, Databases, Blocks APIs
- User and Comment management
- Search functionality
- This is the minimum version for SDK v4.x
- Upgrading from earlier API versions requires reviewing response structures
Best Practices
- Match SDK and API versions: Use the default API version for your SDK version
- Test upgrades thoroughly: Always test in a staging environment before upgrading in production
- Monitor API changes: Subscribe to Notion’s developer updates for API changes
- Document your version: Note your API version in your application documentation
- Gradual rollout: When upgrading, consider a gradual rollout to detect issues early
Troubleshooting Version Issues
Error: “The API version is not supported”
This error occurs when using an API version that’s too old or not recognized:Type Errors in TypeScript
If TypeScript shows errors for properties that should exist:- Ensure your SDK version matches your API version requirements
- Clear and reinstall dependencies:
- Restart your TypeScript server (VS Code:
Cmd+Shift+P> “Restart TS Server”)
Unexpected Response Structures
If API responses don’t match your expectations:- Check the Notion API changelog for your version
- Verify you’re using the correct API version:
- Enable debug logging to inspect raw responses:
Getting Help
For API version-related questions:- Review Notion API versioning documentation
- Check changes by version
- Contact Notion developers at
developers@makenotion.com - Report SDK issues on GitHub
Next Steps
Upgrading Guide
Learn how to upgrade between major SDK versions
Client Configuration
Explore all Client configuration options