Engineering Practice · Letter A

API Versioning Strategy

The agreed way an interface evolves without breaking the clients already depending on it — a product decision that determines how much of the team's future is spent on backward compatibility.

By Dr. Hassan Eliwa, PhD · Founder of PMMilestone.org and PMMilestone.com · Updated 2026-09-10

Definition

An API versioning strategy is the explicit policy for how an interface changes over time: what counts as a breaking change, how versions are expressed (URI path, header, media type or query parameter), how long each version is supported, how deprecation is communicated, and how consumers are migrated. It covers both the mechanism and the contract with consumers — and the second half is the one teams underestimate.

Why It Matters

Every published API creates an obligation. Once an external team, mobile app or partner integrates, the shape of your response is part of their code. Change it carelessly and you break production systems you cannot see. Versioning is how you retain the freedom to evolve while honouring that obligation. Get it wrong in the permissive direction and consumers break; get it wrong in the conservative direction and you accumulate five live versions, each with its own tests, bugs and edge cases, consuming engineering capacity indefinitely.

What Actually Constitutes a Breaking Change

  • Removing or renaming a field, endpoint or enum value.
  • Changing a field's type, or making an optional request field required.
  • Tightening validation, changing default behaviour, or altering error codes consumers branch on.
  • Changing pagination, ordering or default page size where clients assumed stability.

Additive changes — new optional fields, new endpoints, new optional parameters — are non-breaking provided consumers tolerate unknown fields. Establishing that tolerance in your own client libraries early is one of the highest-leverage decisions available.

Real-World Example

A payments platform I worked with ran /v1 for four years and shipped a /v2 that reorganised its transaction object properly. Both were maintained, and eighteen months later 71% of traffic was still on /v1 because nothing had forced anyone to move. Every bug fix had to be applied twice, in two differently-shaped codebases, and a subtle divergence in currency rounding between them caused a reconciliation incident that took a week to unpick.

The recovery was procedural rather than technical. They instrumented per-consumer version usage, published a dated sunset for /v1 twelve months out, sent quarterly notices naming the specific endpoints each consumer still called, and offered migration support to the twelve largest integrators. They also introduced a hard internal rule: at most two supported major versions, and a new major version cannot ship until a sunset date for the oldest is published. /v1 retired on schedule, with three consumers needing an emergency extension.

The lesson: the technical mechanism of versioning was never the problem. The absence of an expiry date was.

Practical Lessons Learned

  • Nothing migrates without a deadline. Consumers optimise rationally — a version with no sunset date will be used forever.
  • Cap supported versions numerically. Two is workable, three is painful, four means a permanent maintenance tax.
  • Additive evolution avoids most versioning entirely. Many "we need v2" conversations are really "we want to tidy up" conversations.
  • You cannot manage deprecation without usage data per consumer. Aggregate traffic tells you nothing about who to call.
  • Publish the breaking-change definition. Ambiguity here produces incidents both ways: unexpected breaks, and paralysis about safe changes.

Expert Tips

  • Emit Deprecation and Sunset response headers on retiring versions. Well-behaved clients surface them in logs long before your email reaches the right person.
  • Instrument version usage by API key from day one. Retrofitting attribution during a sunset is miserable work.
  • Use contract tests in CI so an accidental breaking change fails the build rather than a customer's integration.
  • Prefer URI path versioning for public APIs — it is visible in logs, easy to route and easy for consumers to reason about. Header versioning is elegant and consistently harder to debug.
  • Ship a migration guide with concrete before/after payloads, not a changelog. Consumers migrate from examples.

Common Mistakes

  • Versioning nothing and treating every change as safe until a consumer complains.
  • Creating a new major version for changes that could have been additive.
  • Announcing deprecation without a dated sunset, so the announcement carries no weight.
  • Maintaining old versions by copying the codebase, which guarantees behavioural divergence.
  • Assuming internal consumers need less notice than external ones — internal teams have roadmaps too.

Key Takeaways

  • Define breaking changes in writing and publish the definition.
  • Prefer additive evolution; reserve major versions for genuine restructuring.
  • Every version needs a sunset date, or it never retires.
  • Cap the number of supported versions at two.
  • Instrument usage per consumer, and enforce compatibility with contract tests in CI.

Related Concepts

Pairs with Contract Testing, Schema Change Discipline, Release Notes Discipline, and Zero-Downtime Migration.

Frequently Asked Questions

  • Should API versions go in the URL or in a header?
    For public APIs, the URL path is usually the better trade-off: it is visible in logs and dashboards, trivially routable, and easy for consumers to discuss. Header or media-type versioning is theoretically cleaner but consistently harder to debug, cache and support.
  • How long should an old API version be supported?
    Long enough for consumers to plan a change inside a normal roadmap — six to twelve months is typical for public APIs, shorter for internal ones. What matters more than the length is that the date exists, is published, and is enforced.
  • Is adding a new field a breaking change?
    Not if consumers tolerate unknown fields, which is why establishing that expectation in your documentation and client libraries early is so valuable. If any consumer performs strict schema validation, additive changes become breaking for them and you need to know that before shipping.
  • How many API versions should be live at once?
    Two supported major versions is a sustainable ceiling for most teams. Beyond that, every fix multiplies, behaviour drifts between versions, and the maintenance load quietly consumes the capacity you needed for new work.
  • How do you get consumers to actually migrate?
    A dated sunset, per-consumer usage data so you can contact the specific teams still calling old endpoints, a migration guide with concrete payload examples, and hands-on support for your largest integrators. Announcements without dates and without names change nothing.
  • Do internal APIs need versioning?
    Yes, whenever the producer and consumer deploy independently. The mechanism can be lighter and the notice periods shorter, but the failure mode is identical: a change ships, a consumer breaks, and nobody knew the dependency existed. Contract tests are the cheapest safeguard here.
  • Which calculators on PMMilestone.org apply to API Versioning Strategy?
    For API Versioning Strategy, the most relevant tools on the flagship platform are the EVM, SPI and CPI calculators on PMMilestone.org. They reproduce the formulas referenced in this entry against your own project data.
  • What is a common misconception about API Versioning Strategy?
    That the topic is well-defined across all references. In practice, definitions vary between PMBOK, PRINCE2, AACE and ISO 21500 — this entry uses the definition most aligned with field practice on capital projects, and flags where the standards diverge.
  • Which related encyclopedia entries should I read alongside API Versioning Strategy?
    Read Earned Value Management, Critical Path Method and the DCMA 14-point assessment next. The full A–Z is available in the PMMilestone Encyclopedia, and quick one-line definitions live in the PM Glossary on the flagship platform.
  • How does Dr. Hassan Eliwa's research treat API Versioning Strategy?
    Dr. Hassan Eliwa's research focuses on owner-side project controls, schedule integrity and forensic delay analysis on capital construction and power programmes. API Versioning Strategy is treated through that lens — what a planning or controls engineer is expected to do with it on a live project, not its textbook definition alone. See the full research library at PMMilestone Research Articles.
  • How is API Versioning Strategy defined on PMMilestone Research & Insights?
    The agreed way an interface evolves without breaking the clients already depending on it — a product decision that determines how much of the team's future is spent on backward compatibility. For the full treatment, see the definition, principles, applications and related entries above — every encyclopedia entry follows the same research-grade structure.

People also ask

Follow-up questions practitioners search for next — each one points to the calculator, template or reference entry that answers it.

Related Entries

Browse more in this category

More in Engineering Practice

View all Engineering Practice entries →

Further reading on PMMilestone.org

Curated companion resources hosted on the flagship platform, PMMilestone.org.

Related Encyclopedia Entries
Research Articles
Career Guides
Tools on PMMilestone.org
Buy me a coffee