API deprecation: migrate safely before shutdown
API deprecation is the stage when an existing API or feature is no longer recommended and may later be removed or unsupported. A deprecation notice does not mean the API has stopped working. The provider should clarify scope, replacement, schedule, and shutdown behavior; consumers should find real calls, migrate, and verify.
API deprecation is the stage when an existing API or feature is no longer recommended and may later be removed or unsupported. A deprecation notice does not mean the API has stopped working. The provider should clarify scope, replacement, schedule, and shutdown behavior; consumers should find real calls, migrate, and verify.
A notice is not a shutdown
IETF RFC 9745 defines the HTTP Deprecation response header as a way to signal that a resource has been or will be deprecated. The header itself does not change resource behavior. A Link with the deprecation relation can point to guidance. RFC 8594's Sunset header signals that a resource is expected to become unresponsive after a specific time. The two fields use different date formats, and a Sunset time must not precede the Deprecation time.
Headers alone do not guarantee a migration plan or shutdown. Distinguish RFC field semantics from a provider's concrete header format. For example, GitHub's REST API docs describe its own Deprecation and Sunset date values and say requests to a retired supported version return 410 Gone. Do not assume another provider uses the same value format or support period; follow that API's documentation.
Provider: publish an actionable plan
A deprecation notice should state:
affected product, API version, resources, fields, and request conditions;
effective deprecation date, actual end-of-support date, time zone, and grace policy;
replacement API or feature, changes, migration steps, and required permissions;
compatibility changes, sample requests/responses, error handling, and test environment;
related updates to webhooks, SDKs, docs, and operational tools;
support contact and how urgent security or reliability changes will be announced.
Clarify whether the scope is a whole version or selected endpoints. If it is broad, explain where clients can see the signal. Do not use observed usage alone to decide that removal is safe: offline clients, rare calls, and third-party integrations may be missing from measurements. Align the removal date with support, contract, and operational commitments, and define an exception process for urgent security issues.
Consumer: find calls and verify the migration
Search code, configuration, API gateway records, SDKs, and batch jobs for every service calling the retired version, path, or field. Respect retention and privacy rules; do not assume logs are complete.
Read the provider's migration guide and changelog. Identify removals, renames, type changes, new required values, and authentication changes. Moving to a new feature or version may require more than changing a URL.
Update request and response handling, permissions, errors, and retries for the new contract. If a test account or environment exists, verify success, failure, boundary cases, and asynchronous events.
Specify optional version headers and roll out in stages. Check success metrics on the new path and, where possible, track declining calls to the old path.
Contact owners of remaining calls before the removal date. Since the old API may return `410` or another error after retirement, ensure clients do not retry a terminal error forever.
Completion criteria
Do not declare migration complete just because code changed. Confirm that calls to the retired API are no longer observed, or document an exception with an owner and end date; validate the replacement contract, permissions, and error handling; and prepare monitoring and rollback criteria. Check that dates match across response headers, docs, and rollout settings. If the schedule changes, update every notice.
Sources
[RFC 9745: Deprecation HTTP response header](https://datatracker.ietf.org/doc/html/rfc9745)
[RFC 8594: Sunset HTTP header](https://datatracker.ietf.org/doc/html/rfc8594)
[GitHub REST API versioning and deprecation/shutdown header example](https://docs.github.com/en/rest/about-the-rest-api/api-versions)