The v2 API is available at api.unkey.com (instead of api.unkey.dev). The v1 API is deprecated and will be shut down at the end of the year 2025.
Quick Start
The fastest way to migrate is to update your SDK:Why Migrate to v2?
Proven Performance Improvements
Our v2 changes produce measurable latency improvements across all regions:
Global P95 Latency improvement for key verifications when switching from v1 to v2
Key Changes of v2
- New Domain: API available at
api.unkey.com
instead ofapi.unkey.dev
- Enhanced Caching: Server-based infrastructure with improved caching mechanisms
- Improved Invalidations: Enhanced cache invalidation system across regions
- Improved Developer Experience: More consistent error handling and response formats
What You Need to Change
The main changes you’ll need to make when migrating:- Update your base URL from
api.unkey.dev
toapi.unkey.com
(The SDKs do this automatically starting at v2.0.0) - Change response parsing from direct responses to
response.data
- Handle new error format with hierarchical error codes and request IDs
Response Format Changes
All v2 responses now use a standardized envelope format withmeta
and data
fields:
v1 Response Format
v2 Response Format
Detailed Migration by Category
Choose the endpoint category you need to migrate:Keys Endpoints
Key creation, verification, updates, permissions, and roles
APIs Endpoints
API namespace creation, retrieval, and key listing
Identities Endpoints
Identity management and shared rate limits
Permissions Endpoints
Standalone permission and role management
Rate Limiting Endpoints
Rate limiting and override management
Error Handling
Error response format changes and codes
Getting Help
- Documentation: https://unkey.com/docs/api-reference/v2
- Discord: https://unkey.com/discord
- GitHub Issues: https://github.com/unkeyed/unkey/issues
- Email Support: support@unkey.dev
- Book a Call: https://cal.com/team/unkey/founders - Schedule time with our team for migration help or feedback