Lesson 4 of 9 · 25m
A Deprecation Policy Clients Can Plan Around
Publish lifecycle states, timelines, header signals, migration windows, and support commitments that make deprecation predictable instead of adversarial.
Deprecation fails when it is treated as an announcement instead of a program. The endpoint still works, the documentation still uses it, nobody knows who depends on it, and the sunset date arrives with all the grace of a power outage. Good deprecation is boring: clear states, enough time, machine-readable signals, human-readable instructions, and no surprise enforcement.
Define lifecycle states precisely
A lifecycle is useful only when each state changes behavior or expectation:
beta may change; opt-in; not covered by stable compatibility guarantees
stable supported; only compatible changes; normal SLA applies
deprecated still works; migration recommended; sunset date or minimum window published
sunsetting enforcement has begun; brownouts or reduced availability may occur
retired no longer serves the original behavior; terminal error or removal"Deprecated" is not a mood. It must have consequences clients can plan around: no new features, migration documentation available, support scope narrowed, and a date or minimum notice period.
Use standard signals where possible
HTTP has useful conventions. Deprecation communicates that the endpoint is deprecated; Sunset communicates when it is expected to become unavailable; Link can point to migration documentation:
HTTP/2 200 OK
Deprecation: @1735689600
Sunset: Sat, 31 Jan 2026 23:59:59 GMT
Link: <https://docs.acme.dev/migrations/invoices-v2>; rel="deprecation"Do not rely on headers alone. Clients may ignore them, generated SDKs may hide them, and many integrators only notice email or a breaking incident. Headers are telemetry triggers and machine-readable evidence, not the entire communication plan.
Choose timelines based on integration reality
Thirty days may be reasonable for an internal service controlled by three teams. It is usually absurd for a public API with mobile clients, vendor approval cycles, and quarterly enterprise release windows. Consider client release cadence, contractual obligations, data criticality, and the cost of maintaining overlap.
small internal API 60-90 days
partner API 6-9 months
mobile-dependent API aligned to app-store adoption, often 12+ months
security-critical flaw shortest feasible window with direct outreachMigration guides are operational artifacts
A migration guide should include side-by-side requests, field mapping, behavioral differences, SDK versions, cutoff dates, testing guidance, and rollback implications:
| v1 field | v2 field | notes |
|---------------|---------------------|--------------------------------|
| amount_cents | total.minor_units | integer minor units unchanged |
| user_id | owner.id | ownership object expanded |
| created_at | created_at | unchanged RFC 3339 UTC |If the guide does not answer "what do I change today?" it is documentation theater.
Field notes
- Deprecating documentation before implementation support exists makes clients choose the wrong path.
- Never let the deprecation header depend on clients calling the doomed endpoint during a brownout only; emit it during normal operation too.
- Contracts with enterprise customers may override generic timelines. Legal reality belongs in the plan.
- Track exceptions explicitly. Quiet permanent exceptions become hidden product requirements.
Was this lesson helpful?