Skip to content

Lesson 9 of 9 · 25m

The Retirement Runbook and Post-Sunset Truth

Plan final enforcement, terminal responses, archive ownership, data compatibility, cleanup, and the retrospective that prevents repeated migration debt.

Sunset day is not the end of the work. It is the moment hidden coupling becomes visible: old SDKs, cron jobs, partner callbacks, cached documentation, internal dashboards, and that one service everyone forgot still calls the endpoint. A retirement runbook turns that day from improvisation into an operational procedure with owners, evidence, and a clean aftermath.

Write the runbook before the final week

A practical runbook fits on one page:

owner: payments-api oncall + migration lead
final enforcement: 2026-01-31 23:59 UTC
pre-checks: adoption threshold met; exceptions approved; 410 verified; support macros published
execution: enable flag; verify v2 owner traffic and v1 terminal response; monitor errors, webhooks, support
rollback: disable enforcement flag if pause criteria are met
cleanup: archive docs; remove stale examples; schedule shim deletion

The runbook should name the communication owner as clearly as the technical owner. Silence during a visible cutoff creates panic even when enforcement is correct.

Choose truthful terminal behavior

Removed behavior can return 404 Not Found, 410 Gone, or a redirect. 410 Gone is semantically honest when the resource endpoint intentionally no longer exists and can carry migration guidance. Redirects are dangerous for APIs because clients may follow them across methods and hosts without understanding changed semantics.

HTTP/2 410 Gone
content-type: application/problem+json
cache-control: public, max-age=86400

{"type":"https://docs.acme.dev/errors/invoices-v1-retired","title":"Invoices API v1 has been retired","migration":"https://docs.acme.dev/migrations/invoices-v2"}

Cache the terminal response carefully. A CDN caching a temporary brownout failure forever is not enforcement; it is self-inflicted corruption.

Preserve historical data meaning

Retiring an endpoint does not retire the data model, audit obligations, or webhook history. If v1 IDs appear in customer records, invoices, logs, or data exports, document their mapping forever. If old webhook events remain valid historical evidence, keep schemas archived even when delivery stops.

archive: final v1 OpenAPI snapshot; migration field mapping; terminal error examples; exception register; adoption snapshot; postmortem notes

Schema archaeology is real work. The engineer debugging a three-year-old financial discrepancy will thank you.

Run the retrospective that matters

Ask why the old version survived as long as it did, why customers delayed, what migration tooling was missing, which communication channel worked, and whether the original contract was under-specified. Feed the answers back into versioning policy, telemetry, and design review. Otherwise the next version migration will be the same incident with newer timestamps.

Field notes

  • Keep the retirement error documented and stable; customers will encounter it long after your team moves on.
  • Do not reuse retired route names for different semantics. Confusing resurrection destroys debugging and audit clarity.
  • Internal consumers are often the last violators because nobody emails them. Measure them with the same rigor.
  • Sunset success is not zero traffic immediately; it is zero unexplained business impact and a clean path for the remaining noise.

Was this lesson helpful?

Sign in to rate