Help us improve
Share bugs, ideas, or general feedback.
Implements API versioning using URL paths, headers, or query parameters with deprecation timelines, backward compatibility, and migration strategies. Use for managing multiple versions or planning breaking changes.
npx claudepluginhub secondsky/claude-skills --plugin api-versioning-strategyHow this skill is triggered — by the user, by Claude, or both
Slash command
/api-versioning-strategy:api-versioning-strategyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Choose and implement API versioning approaches with proper deprecation timelines.
Implements API versioning via URL paths, headers, or query params with backward compatibility, deprecation headers, migration paths, and OpenAPI-based breaking change detection.
Guides API versioning strategies including URL path, header, query parameter, and content negotiation. Helps manage breaking changes, deprecations, and multiple versions.
Guides API versioning strategies: URL path vs headers, Stripe-style date-based, deprecation with sunset headers, backward compatibility, and non-breaking evolution.
Share bugs, ideas, or general feedback.
Choose and implement API versioning approaches with proper deprecation timelines.
| Method | Example | Pros | Cons |
|---|---|---|---|
| URL Path | /api/v1/users | Clear, cache-friendly | URL clutter |
| Header | API-Version: 1 | Clean URLs | Hidden, harder to test |
| Query | ?version=1 | Easy to use | Not RESTful |
const v1Router = require('./routes/v1');
const v2Router = require('./routes/v2');
app.use('/api/v1', v1Router);
app.use('/api/v2', v2Router);
// Transform between versions
const v1ToV2 = (v1Response) => ({
data: {
type: 'user',
id: v1Response.user_id,
attributes: {
name: v1Response.user_name,
email: v1Response.email
}
}
});
app.use('/api/v1', (req, res, next) => {
res.setHeader('Deprecation', 'true');
res.setHeader('Sunset', 'Sat, 01 Jun 2025 00:00:00 GMT');
res.setHeader('Link', '</api/v2>; rel="successor-version"');
next();
});
Safe Changes (no version bump):
Breaking Changes (requires new version):
| Phase | Duration | Actions |
|---|---|---|
| Deprecated | 3 months | Add headers, docs |
| Sunset Announced | 3 months | Email users |
| Read-Only | 1 month | Disable writes |
| Shutdown | - | Return 410 Gone |