vishal patel
Applied in productionIntermediateUpdated 2026-09-23

API Evolution & Backward Compatibility

Change APIs without breaking clients — additive changes, tolerant readers, versioning strategy and explicit compatibility boundaries.

api-designversioningcontractsplatform

Safe vs breaking changes

✅ Usually safe (additive)❌ Breaking
New optional request fieldRemoving or renaming a field
New response fieldChanging a type or format (stringobject)
New endpointMaking an optional field required
New enum value if clients are tolerantChanging defaults or semantics silently
New error detail inside the existing envelopeNew error shape or status code for an existing case

Strategy

diagram
  • Tolerant reader: clients ignore unknown fields. Document that as part of the contract.
  • Version boundary: decide which versions get new behaviour and state it explicitly.
  • Deprecation with data: measure who still calls v1 before you remove anything.
  • Contract tests (e.g. Pact) in CI for internal consumers.
Where I've used it

Disable Fallback Publishing was enforced in the v2 release service only. Legacy v1 releases were left unchanged, which is an explicit compatibility boundary. We also reused the existing SKIPPED status and error envelope, so no new fields, statuses or error codes were introduced. Existing clients kept working, and the new rule applied only where the product had opted in.

Sources & further learning

Videos, courses, docs and books I recommend for this topic.

Related topics