Skip to content
Article Issue #5256

API Versioning

What to know

API versioning is the practice of managing change in a public API so that existing consumers continue to work as new features or breaking changes are introduced; URL path versioning embeds the version in the path (for example, /v1/users vs; Versioning strategy is an early architectural decision with long-term consequences

API Versioning, WikiWalls Glossary illustration

« Back to Glossary Index

API versioning is the practice of managing change in a public API so that existing consumers continue to work as new features or breaking changes are introduced. Without versioning, any breaking change requires all consumers to update simultaneously, which is impractical for widely-used APIs.

How it works

URL path versioning embeds the version in the path (for example, /v1/users vs. /v2/users), making the version explicit and easy to route. Header-based versioning uses an Accept header or custom header (for example, API-Version: 2024-01-01) to select behavior. Date-based versioning, popularized by Stripe, uses a release date as the version identifier.

Key facts

  • URL versioning: Most discoverable approach; makes version explicit in every request
  • Sunset header: RFC 8594 defines the Sunset header for communicating deprecation dates to consumers
  • Deprecation period: Best practice is to maintain old versions for at least 6-12 months after announcing deprecation

For builders

Versioning strategy is an early architectural decision with long-term consequences. Building a deprecation and sunset process alongside the versioning scheme prevents the accumulation of unmaintained API versions.

Sources

« Back to Definition Index
Administrator · 41 published guides · Joined 2016

Welcome to wikiwalls

The WikiWalls Journal · Free, weekly

One careful fix in your inbox each Wednesday.

No affiliate links inside the diagnosis. No sponsored "top 10". One careful fix per week — unsubscribe in one click.

No tracking pixels · No spam · Edited by a human.