How should a product team change an API without breaking its consumers?
Change an API by identifying its consumers, preserving the existing contract where possible, and testing old and new clients against the proposed behaviour. For a breaking change, provide a supported transition path with clear ownership, communication and retirement criteria. Product manages consumer impact and priority; Engineering owns contract design, compatibility testing and safe rollout.
Key takeaways
- Inventory consumers and the behaviours they actually depend on.
- Prefer compatible additions and verify assumptions with contract tests.
- Give breaking changes an explicit version and migration window.
- Retire an old contract only after usage and consumer readiness are checked.
An API change can be small in a code review and large for the people who depend on it. A renamed field, altered error or tighter validation can interrupt another team or a customer integration. The problem is a product relationship as well as an engineering interface.
Treat the API as a product contract
The contract includes requests, responses, errors, authentication expectations and operational behaviour. Identify known internal and external consumers, their owners and the journeys that would fail if behaviour changed. Product sets the value and timing of the new capability and communicates consequences. Engineering documents the technical contract and checks where consumers may rely on undocumented behaviour.
Start with compatibility
A compatible addition can often let old and new clients coexist. Keep old fields and accepted request forms until consumers have moved; test the assumptions rather than assuming every client ignores unfamiliar fields. Consumer contract tests, representative integration tests and traffic observations complement schema checks. They do not reveal unknown consumers by themselves, so keep a discovery and support route open.
Create a transition path
When compatibility cannot be preserved, publish a new version or an agreed adapter. State what changes, how consumers migrate, who can help and when the previous contract is proposed to end. A deprecation date should reflect actual consumer constraints and support obligations, not just provider convenience. Coordinate changes with affected teams before deployment, and use staged exposure where practical. AI can help compare schemas or draft migration notes, subject to human verification of behaviour.
Observe and retire safely
Monitor calls to old and new contracts, errors and the affected user journey. Confirm that clients can complete important tasks, including failure handling. Escalate consumers that cannot migrate and decide whether to extend support or provide an adapter. Remove an old version only when its remaining usage and contractual commitments are understood. Record why the transition is complete so future teams do not repeat the same ambiguity.
Example
Hypothetically, an internal fulfilment API adds several delivery addresses to an order. Engineering first adds the new representation while preserving the single-address response used by a warehouse client. Product agrees the migration priority with the warehouse team. Contract tests and usage logs show when the client has moved; the old response is removed only after its owner confirms readiness.
FAQs
-
Does adding a response field always preserve compatibility?
Often, but only if consumers tolerate unknown fields. Check actual clients and contract tests.
-
Is a new version required for every change?
No. Compatible changes can usually stay within a contract; use a new version when behaviour or structure would break consumers.
-
Who decides when to retire an old version?
The provider team proposes it with consumer evidence; Product weighs impact and commitments while Engineering verifies technical readiness.
Making Product Engineering real
Is your delivery model still fit for the way products are built today? Talk to us about moving to Product Engineering.