Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
aj-geddes avatar

Api Versioning Strategy

  • 419 installs
  • 305 repo stars
  • Updated March 4, 2026
  • aj-geddes/useful-ai-prompts

api-versioning-strategy is an agent skill that implements API versioning schemes, backward-compatibility rules, deprecation timelines, and client migration guides for developers managing breaking changes across REST, Gra

About

api-versioning-strategy is a useful-ai-prompts skill with reference guides on versioning approaches, backward-compatibility patterns, deprecation strategy, migration examples, and version detection routing for REST, GraphQL, and gRPC APIs. It includes Express and TypeScript quick-start examples for /api/v1 and /api/v2 routes with version-specific response transformers and recommends versioning from day one, supporting at least two simultaneous versions, and giving consumers 6–12 months deprecation notice. Developers reach for api-versioning-strategy when adding breaking fields, deprecating endpoints, writing migration documentation, or choosing between URL, header, and content-negotiation versioning before shipping API changes.

  • version schemes
  • deprecation policy
  • backward compatibility
  • client migration
  • changelog discipline

Api Versioning Strategy by the numbers

  • 419 all-time installs (skills.sh)
  • Ranked #1,050 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill api-versioning-strategy

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs419
repo stars305
Last updatedMarch 4, 2026
Repositoryaj-geddes/useful-ai-prompts

How do you version REST APIs without breaking clients?

Define URL, header, or media-type versioning schemes, deprecation timelines, backward-compatibility rules, and client migration plans before breaking API changes ship.

Who is it for?

API developers designing versioned REST, GraphQL, or gRPC services who need backward compatibility and documented client migration paths.

Skip if: Internal-only prototypes with no external consumers where breaking changes can ship without version negotiation or deprecation policy.

When should I use this skill?

The task involves API versions, deprecating endpoints, managing breaking changes, or implementing version routing across supported releases.

What you get

A versioning scheme document, route or adapter patterns, deprecation timeline, migration guide with code examples, and multi-version test plan.

  • versioning scheme specification
  • migration guide
  • multi-version routing implementation

By the numbers

  • Includes 12 reference guides in the references directory
  • Recommends 6–12 months deprecation notice for API consumers
  • Advises supporting at least 2 API versions simultaneously

Files

SKILL.mdMarkdownGitHub ↗

API Versioning Strategy

Table of Contents

Overview

Comprehensive guide to API versioning approaches, deprecation strategies, backward compatibility techniques, and migration planning for REST APIs, GraphQL, and gRPC services.

When to Use

  • Designing new APIs with versioning from the start
  • Adding breaking changes to existing APIs
  • Deprecating old API versions
  • Planning API migrations
  • Ensuring backward compatibility
  • Managing multiple API versions simultaneously
  • Creating API documentation for different versions
  • Implementing API version routing

Quick Start

Minimal working example:

// express-router.ts
import express from "express";

const app = express();

// Version 1
app.get("/api/v1/users", (req, res) => {
  res.json({
    users: [{ id: 1, name: "John Doe" }],
  });
});

// Version 2 - Added email field
app.get("/api/v2/users", (req, res) => {
  res.json({
    users: [{ id: 1, name: "John Doe", email: "john@example.com" }],
  });
});

// Shared logic with version-specific transformations
app.get("/api/:version/users/:id", async (req, res) => {
  const user = await userService.findById(req.params.id);

  if (req.params.version === "v1") {
    res.json({ id: user.id, name: user.name });
// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

GuideContents
Versioning ApproachesVersioning Approaches
Backward Compatibility PatternsBackward Compatibility Patterns
Deprecation StrategyDeprecation Strategy
Migration Guide ExampleMigration Guide Example
Response StructureResponse Structure
Date FormatDate Format, Error Format
JavaScript/TypeScriptJavaScript/TypeScript, Python
GraphQL VersioningGraphQL Versioning
gRPC VersioninggRPC Versioning
Version Detection & RoutingVersion Detection & Routing
Testing Multiple VersionsTesting Multiple Versions
Pattern 1: Version-Agnostic CorePattern 1: Version-Agnostic Core, Pattern 2: Feature Flags for Gradual Rollout, Pattern 3: API Version Metrics

Best Practices

✅ DO

  • Version from day one (even if v1)
  • Document breaking vs non-breaking changes
  • Provide clear migration guides with code examples
  • Use semantic versioning principles
  • Give 6-12 months deprecation notice
  • Monitor usage of deprecated APIs
  • Send deprecation warnings to API consumers
  • Support at least 2 versions simultaneously
  • Use adapters/transformers for version logic
  • Test all supported versions
  • Log which API version is being used
  • Provide migration tooling when possible
  • Be consistent with versioning approach

❌ DON'T

  • Change API behavior without versioning
  • Remove versions without notice
  • Support too many versions (>3)
  • Use different versioning strategies in same API
  • Break APIs without incrementing version
  • Forget to update documentation
  • Deprecate too quickly (<6 months)
  • Ignore feedback from API consumers
  • Make every change a new version
  • Use version numbers inconsistently

Related skills

How it compares

Choose api-versioning-strategy when external API consumers need documented migration paths rather than ad-hoc breaking endpoint edits.

FAQ

Which versioning approaches does api-versioning-strategy cover?

api-versioning-strategy documents URL path versioning, header-based versioning, media-type negotiation, plus GraphQL and gRPC-specific patterns. Reference guides cover version detection, routing, and testing across simultaneously supported releases.

What deprecation timeline does api-versioning-strategy recommend?

api-versioning-strategy recommends giving API consumers 6–12 months deprecation notice, monitoring usage of deprecated endpoints, sending deprecation warnings, and supporting at least two versions simultaneously before removal.

Does api-versioning-strategy include code examples?

api-versioning-strategy provides a TypeScript Express quick start with separate /api/v1 and /api/v2 routes, shared service logic, and version-specific response transformers, plus additional patterns in the references directory.

Backend & APIsbackenddocsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.