Blog

API Versioning Is a People Problem, Not a URL Problem

September 6, 2026Xerat023 min read
Share
API Versioning Is a People Problem, Not a URL Problem

Ask how to version an API and you'll get into a genuinely long debate about /v1/ URL prefixes versus an Accept header versus a custom version header versus no explicit versioning at all. That debate is worth having, but it skips past the part that actually determines whether versioning works in practice: the mechanism you pick matters far less than whether you have a real plan for what happens to the clients on the old version while the new one exists.

The three common mechanisms, briefly

  • URL path versioning (/v1/users, /v2/users) — the most visible and the easiest for a developer to reason about by just looking at a request. Its downside is that it treats a resource's identity as tied to a version, which sits awkwardly with URLs otherwise being meant to identify a thing, not a version of the API describing the thing.
  • Header-based versioning (a custom API-Version header, or content negotiation via Accept: application/vnd.yourapi.v2+json) — keeps the URL itself stable, which fits REST's "a URL identifies a resource" principle more cleanly, at the cost of being less visible: you can't tell which version a request targets just by glancing at the URL in a browser or a log line.
  • No explicit versioning, just careful additive changes — works for a surprising number of APIs if the team is disciplined about only ever adding optional fields and new endpoints, never removing or repurposing existing ones. It falls apart the moment a genuinely breaking change becomes unavoidable.

Why the mechanism is the easy part

Whichever mechanism you pick, the actual hard problem is the same: once v2 exists, v1 doesn't get to disappear the moment v2 ships. Real clients — a mobile app that isn't up to a forced update, a partner's integration that was built once and not actively maintained, an internal tool nobody remembers still calls the old version — keep calling the old version for a long time, sometimes indefinitely. Someone has to decide, explicitly, how long that's supported, what happens when it's finally shut off, and how anyone finds out a deprecation is coming before it actually breaks something.

This is why "add a /v2/ prefix" is the easy 10% of versioning and "figure out the deprecation policy, communicate it, and actually enforce a sunset date" is the hard 90% that a lot of teams never get around to writing down — which is how you end up with a v1 that was supposed to be retired two years ago still serving a meaningful chunk of production traffic.

What this means for testing

If you support more than one version simultaneously, that's not a hypothetical edge case to handle "someday" — it's two (or more) real APIs your test suite needs to exercise independently, including the specific compatibility guarantees you've promised (does v1 still work exactly as it did before v2 shipped? does a client that only speaks v1 get a sensible error if it's finally sunset, rather than a confusing generic failure?).

Mocking both versions side by side — same underlying resource, deliberately different response shapes per version — is a reasonable way to confirm a client written against v1 doesn't accidentally start depending on v2-only fields, and that your v1 compatibility promises are actually true rather than aspirational. It's a smaller, cheaper way to catch a versioning regression than discovering it from an old mobile app's crash reports months after a change ships.

X

Xerat02

Building MockBase.