Lesson 1 of 9 · 24m
Versioning Is Product Management, Not URL Decoration
Frame API versions as compatibility promises, identify what clients actually depend on, and decide when change requires a version boundary.
The worst API migration I ever inherited had five versions, none of which meant anything. /v1 was old except where it was new, /v2 was beta except for billing, and several clients had pinned behavior nobody remembered shipping. The failure was not technical. It was a missing product decision: what promise are we making to integrators, for how long, and at what cost?
A version is a compatibility promise
Clients do not integrate with your codebase. They integrate with observed behavior:
URL structure /v1/invoices/{id}
Authentication Bearer token in Authorization header
Request shape JSON keys, types, nullability, enums
Response shape fields, ordering assumptions, error bodies
Side effects webhooks, emails, state transitions
Operational behavior rate limits, pagination, idempotency, latencyAny of those can become an accidental dependency. A team may think it is versioning only endpoints, while customers are depending on pagination cursors, error text, webhook ordering, and whether omitted means null. Versioning starts by inventorying those promises honestly.
Breaking versus non-breaking is contextual
Adding a field is usually backward compatible for JSON readers, but it can break strict schema validators, fixed-width exports, or clients that log entire payloads. Changing a value's meaning can break clients even when the type stays the same.
# v1 response
{"status": "active", "trial": false}
# harmful v2 change with the same wire shape
{"status": "active", "trial": false} # status now means billing status, not account stateTreat compatibility as a consumer-centered question. Can a correctly written existing client continue to operate without modification? If the honest answer is "sometimes not," you are making a breaking change.
Version when the boundary buys clarity
A new version is justified when the old and new behaviors cannot safely coexist behind additive evolution. Examples include different resource identities, incompatible authentication, changed pagination semantics, or a new lifecycle model. It is not justified for every cleaned-up field name. Version proliferation is a tax on routing, tests, documentation, security review, analytics, and support.
Write the promise down
A usable policy answers who supports the version, what changes are permitted inside it, how long it is maintained, and how retirement is announced:
stable: additive compatible changes only; minimum 12 months notice before removal
beta: breaking changes possible with changelog notice; not for production dependencies
deprecated: no new features; security fixes only; sunset date published
sunset: endpoint returns terminal error or is removedWithout these states, every disagreement becomes a negotiation conducted during an incident.
Field notes
- Undocumented behavior still becomes compatibility debt once customers depend on it.
- Your SDKs are clients too; if they encode loose behavior, they spread it.
- The database schema is not the API contract. Exposing it directly couples internals to consumers.
- If product cannot name the client harm, engineering cannot name the versioning boundary.
Was this lesson helpful?