Skip to content
Back to skills

Api Versioning Strategy

ASecurity

Plans and introduces a new API version without breaking existing clients, with deprecation headers, usage tracking and a dated sunset schedule.

  • 3 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added November 15, 2026
ai-agentsapi

Works with

  • cli
  • api

Security analysis

A100/100

Scanned November 15, 2026

npx -y skills add workspace-templates/ai-agent-templates --skill api-versioning-strategy --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Api Versioning Strategy?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Api Versioning Strategy
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/workspace-templates-api-versioning-strategy/badge)](https://www.skillsdirectory.com/skills/workspace-templates-api-versioning-strategy)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: api-versioning-strategy
description: Plans and introduces a new API version without breaking existing clients, with deprecation headers, usage tracking and a dated sunset schedule.
---

# API versioning strategy

Do not version what you can evolve. Version only what you must break.

## Steps

1. Classify the change. Safe: new optional field, new endpoint, new enum value only if clients are told to tolerate unknown ones. Breaking: removed or renamed field, changed type or meaning, new required input, stricter validation, changed status code.
2. If nothing breaks, ship it without a version and stop.
3. Pick the existing selector and stay with it. If none exists, use a URL prefix (`/v2/`) for public APIs or a date header for APIs with many small breaks.
4. Route by version at the edge of the app. Share the domain logic; put only the request and response mapping in per-version modules, so v1 is a thin adapter and not a copy of the code.
5. On the old version, send `Deprecation: true`, `Sunset: <HTTP date>` and a `Link: <migration guide>; rel="deprecation"` header.
6. Log the version, client id and route on every call so you can list who still uses the old version.
7. Write a migration note with before and after payloads for each break.
8. Propose a sunset date no earlier than the notice period the clients were promised. After the date, return 410 with the guide link.

## Rules

- Never change v1 behavior to suit v2.
- Never remove a version while traffic data shows active callers.
- Keep at most two live versions.

## Report

Breaking changes found, the selector chosen, files changed, the sunset date proposed and the clients still on the old version.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.