Problem
Old API versions accumulate maintenance cost and security risk, but removing them abruptly breaks clients who cannot upgrade on short notice. Without a policy, versions live forever or vanish unexpectedly.
Also known as: api-sunset, api-retirement
Retire API versions or endpoints in a predictable, communicated sequence that minimises client breakage.
Old API versions accumulate maintenance cost and security risk, but removing them abruptly breaks clients who cannot upgrade on short notice. Without a policy, versions live forever or vanish unexpectedly.
A deprecation lifecycle is a defined path from supported to removed. It balances the provider's cost of keeping old versions alive against clients' need for time and clear signals.
Each version moves through explicit stages, and responses carry machine-readable signals.
HTTP/1.1 200 OK
Deprecation: true
Sunset: Wed, 30 Jun 2027 00:00:00 GMT
Link: <https://docs.example.com/migrate-v3>; rel="deprecation"
A typical timeline: announce the replacement and dates; mark the old version deprecated and stop adding features; email known consumers identified from API key logs; run brownouts, for example one hour, then one day, then a week, returning 410 or 503 with a helpful message; at sunset return 410 Gone and finally delete code. A dashboard of requests per version per client shows who still needs help.
Low - headers and analytics
High - support and communications effort
Low - process more than technology
Sunset date passes with active critical clients and is postponed indefinitely
Notices never reach the right client owners
Brownout breaks an unknown dependency in production