How to Sunset an API Version Without Breaking Every Partner
Deprecating an old API version is one of those tasks that feels optional right up until you're running three versions in parallel, none of which anyone fully understands anymore, and a security patch has to be applied to all three separately. The technical part of removing old code is easy. The hard part is doing it without breaking a partner integration nobody remembers exists.
This is a step-by-step playbook for retiring an API version cleanly, from the initial usage audit through the hard cutover.
Vendors Covered in this Article
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
Step one: find out who's actually still calling it
Before announcing anything, pull real request logs for the version you intend to deprecate, broken down by API key or client identifier, over at least a 30-day window to catch clients that call infrequently. It's common to find a handful of internal jobs, a partner integration built years ago by someone no longer at the company, or a mobile app version still in use by customers who haven't updated, all calling a version everyone assumed was dead. Skipping this step is the single most common reason a deprecation breaks something unexpectedly.
Step two: set a notice period long enough for the slowest client to react
A notice period should be set based on your slowest realistic client to migrate, not your fastest. An internal team can often move in a sprint; an external partner's engineering team, working through their own backlog and competing priorities, may need 90 days or more. Segment your notice period by client type rather than applying one blanket deadline, and communicate directly, email or a dashboard notice tied to their account, not only a changelog entry nobody reads.
Step three: make the migration easier than staying put
A migration guide that just documents the new endpoint shape puts the entire translation burden on the partner's engineering team, and the harder that translation is, the longer they'll delay. Where possible, run the old and new versions side by side long enough for partners to test against both, provide a mapping table for any renamed or restructured fields, and consider a translation shim that adapts old-format requests to the new endpoint temporarily, buying migration time without extending the full deprecated version's life indefinitely.
For example, suppose the audit shows one partner still sending most of the old version's traffic, and their engineering contact has left the company. A changelog entry and an automated email will go nowhere. The fix is to treat that partner as an account issue, not only a technical one: ask your account or partnerships owner to find a current sponsor, share the exact endpoints and request volumes from your logs, and offer a translation shim as a bridge. Agree on a specific migration date in writing, and confirm it again a week before cutover. Naming an owner on both sides turns an ignored notice into a scheduled task, which is what actually moves a stalled migration.
Step four: use response headers to make the deadline unmissable
Add a Sunset header and a Deprecation header to every response from the old version, per the pattern most API tooling already recognizes, so the deadline is visible to any client inspecting responses programmatically, not just to whoever read the original email. Log every call still hitting the deprecated version in the weeks before cutover, and reach out directly to any client still active a week before the deadline rather than assuming silence means they've migrated.
Step five: the hard cutover, and what to do if something breaks anyway
Even with a careful audit and notice period, cutting off the old version will occasionally surface a client the audit missed, one that calls so rarely it fell outside your logging window. Have a documented, fast path to grant a short, explicit extension to that specific client rather than either breaking them permanently or reopening the deprecated version for everyone. Treat this as an expected edge case to have a plan for, not evidence the whole process failed.
What to do with the code after the version is gone
Deleting a deprecated version's route handlers immediately after cutover is tempting but premature; keep the code, disabled behind a flag, for a short window in case a client resurfaces with a legitimate reason to need it back briefly. Once that window closes, remove it fully rather than leaving dead code and unused dependencies in the codebase indefinitely, since an old version's unpatched dependencies are exactly the kind of finding that turns into an unnecessary security review months later. Document the deprecation, including the audit data and who was contacted, so the next engineer who finds a reference to the old version in an old ticket knows the history without having to ask around.
Run the deprecation in this order:
- Pull request logs for the old version by API key or client identifier, over a window long enough to catch clients that call only occasionally.
- Set notice periods by client type, based on your slowest realistic migrator, and send direct notices tied to each account instead of relying on a changelog.
- Publish a migration guide with a field mapping table, and run old and new versions side by side so partners can test against both.
- Add Sunset and Deprecation headers to every old-version response, and contact any client still calling it a week before the deadline.
- Cut over on the announced date, with a fast path to grant a short, explicit extension to any client the audit missed.
What Good Looks Like
A clean API deprecation audits real usage before announcing anything, sets notice periods by client type rather than a blanket deadline, and makes the new version's migration path easier than staying on the old one.
Building The Capability (5-Stage Skill Ladder)
How to Get Started
Disclosure: We may earn a commission if you buy through some links on this page. It doesn't change what we recommend.
Frequently Asked Questions
How long should a typical API deprecation notice period be?
For an internal-only API, two to four weeks is often enough. For a public API with external partners, 90 days is a common minimum, and a widely used version can warrant six months or more. Base it on your slowest realistic client, not an internal target.
Should we run old and new API versions on the same infrastructure during the transition?
Where feasible, yes, since it simplifies the eventual cutover. If the old version's code has security or maintenance risk you're specifically trying to eliminate, isolate it instead so it can be retired independently of the new version's release cycle.
What if a partner simply ignores every deprecation notice?
Escalate through your account or partnerships contact well before the deadline, not just through automated emails to a technical contact who may not own the relationship. A direct conversation about business impact often moves a stalled migration faster than another automated notice.
About the numbers
This guide doesn't quote a sourced benchmark. Figures in it are estimates or general guidance, so check them against your own numbers.
Related Guides
Retiring an API Without Breaking Every Integration
A sunset date read as a suggestion breaks three partner integrations at once. A realistic timeline for retiring an API endpoint without the fallout.
A Playbook for Sunsetting an API Without Breaking Customers
A practical timeline and communication plan for deprecating an API version, including how to find out who's still calling it before shutdown.
A Playbook for Sunsetting an API Without Breaking Your Customers
A step-by-step playbook for deprecating an API version: what to communicate, how long to wait, and the safeguards that prevent a shutdown incident.
How to Sunset an API Version Without Breaking Every Integration at Once
A step-by-step playbook for deprecating an API version: instrumenting real usage, announcing with teeth, giving a real migration path, and winding down.
A Runbook for Sunsetting an API Without Breaking Every Client
A step-by-step runbook for deprecating an API endpoint or version, from measuring real usage to communicating the timeline to the clients who need it.
A Playbook for Deprecating an API Without Breaking Customers
A step-by-step playbook for deprecating an API version: how much notice to give, how to track who's still on it, and when it's safe to shut it off.