A Runbook for Sunsetting an API Without Breaking Every Client
Deprecating an API version feels like it should be simple: announce a date, remove the old code, move on. In practice, the gap between announcing a deprecation and safely removing the old version is where most of the real work lives, because you can't safely remove what you haven't confirmed is unused.
This runbook is the sequence that turns 'we should deprecate this' into an actual removal without a support ticket surge from clients who never got the memo.
Step 1: how do you measure real usage before announcing anything?
Before setting a deprecation date, add logging or metrics that tell you exactly who's still calling the old endpoint or version, ideally down to an API key or client identifier, not just a raw request count. A deprecation timeline set before you know who's affected is a guess. One set after you've measured actual usage is a plan, and the difference shows up directly in how many surprised clients you hear from later. Give this measurement window enough time to capture your slower, less frequent callers, not just the noisy, high-volume ones that show up in the first few hours of logging.
Step 2: how should you notify clients still using the old API?
A changelog entry or a blog post reaches the clients who are already paying close attention, which is rarely the group still depending on something old enough to be deprecated. Email the specific accounts your usage metrics identify as still calling the old version, with a concrete date and a clear migration path, and repeat that outreach more than once as the date approaches, since one email is easy to miss or forget.
Step 3: give the old version a visible, honest signal, not just documentation
Add a deprecation warning directly in the API response itself, such as a response header or a field noting the sunset date, so any client actually inspecting responses gets a signal even if they missed the email. This also gives you a second, independent way to measure who's still not aware, since you can track whether usage from a given client drops after they'd have started seeing the warning. A client that keeps calling the endpoint at the same rate weeks after the warning appeared is very likely one that isn't inspecting responses at all, which tells you a phone call will do more good than another email.
Step 4: extend before you break anything, don't hold the date rigidly
If usage close to the deadline still shows meaningful traffic from clients who haven't responded to outreach, extending the date costs little and avoids breaking a real integration a customer depends on. Holding a deadline rigidly because it was already announced, once real remaining usage is visible, tends to trade a small scheduling inconvenience for a genuinely damaging customer support incident. Treat the announced date as a target you're confident you'll hit, not a commitment you're locked into regardless of what the numbers say as it approaches.
For example, a few weeks before the announced date, the usage report still shows one partner sending steady traffic and has no reply to earlier emails. Rather than removing the endpoint on schedule, a short call to that partner and a modest extension protects a real integration at almost no cost. Then set a second, firmer date and say plainly that it will hold. The extension costs a small scheduling inconvenience, while a surprise break can cost a support incident and some trust with a client who never saw the notices.
Step 5: remove it, then keep the monitoring in place briefly after
Once usage has genuinely dropped to zero and the removal date arrives, retire the endpoint, but keep an eye on error logs for a period afterward specifically watching for that endpoint. Something the earlier measurement window missed, such as a client that only calls it once a quarter, will show up here instead, and catching it quickly is far better than a client discovering the breakage themselves three months later with no idea why.
A worked example: the batch job that calls the API once a year
Say your usage dashboard shows zero calls to a deprecated endpoint for three straight months, and the team removes it. A client's annual reconciliation job, which only runs once a year, then fails the next time it executes, because it was never captured by a measurement window shorter than its own calling frequency. This is exactly why keeping monitoring active after removal matters: a rare but real caller can look identical to a dead one until enough time has actually passed to be sure.
Use this sequence for any deprecation:
- Instrument usage first, down to the client or API key, and measure long enough to capture slow, infrequent callers.
- Contact the specific accounts still calling the old version directly, with a concrete date and migration path, and repeat the outreach.
- Add a visible deprecation signal to the API response itself, such as a header or field noting the sunset date.
- Extend the date if meaningful traffic remains, rather than holding a deadline rigidly and breaking a real integration.
- Remove the endpoint once usage reaches zero, then keep watching error logs for it to catch rare callers.
What Good Looks Like
A well-run API deprecation measures real usage before setting a date, communicates directly with the clients still calling it, and treats the announced timeline as adjustable based on what the usage data actually shows.
Building The Capability (5-Stage Skill Ladder)
How to Get Started
Frequently Asked Questions
How long should a typical API deprecation window be?
There's no universal number, but the window should be long enough to cover your slowest-moving clients' release cycles, not your fastest ones. A partner that ships quarterly needs meaningfully more notice than an internal team that can update within a sprint, so the window should be set by your slowest real dependency, not an arbitrary default.
What's the biggest mistake teams make when deprecating an API?
Setting the removal date before measuring who's still using it. Without that data, the team is guessing at both the right timeline and who needs direct outreach, and finds out the guess was wrong only after the removal breaks something real for a customer.
Should a deprecated endpoint keep working exactly the same until removal?
Generally yes. Changing behavior during the deprecation window, on top of the eventual removal, gives clients two separate breaking changes to absorb instead of one, and makes it much harder to tell whether a bug report is about the deprecation or an unrelated change.
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.
How to Sunset an API Version Without Breaking Every Partner
A step-by-step playbook for retiring an old API version: usage auditing, notice periods, migration support, and the hard cutover most teams get wrong.
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.
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.
Retiring an API Without Breaking the Callers You Forgot About
A step-by-step runbook for sunsetting an API endpoint: Sunset headers, usage telemetry, direct outreach, and monitoring stragglers before the hard cutoff.