- What headers should I include in deprecated API responses?
- Deprecation: true (or a date), Sunset: <HTTP date of removal>, and Link: <migration-docs-url>; rel=successor-version. These follow RFC 8594 and RFC 7231. Client libraries that check these headers can warn developers automatically.
- How much notice should I give before removing an API endpoint?
- Depends on your consumer base. Public APIs with external developers: 12+ months. Internal APIs between teams: 3-6 months. Emergency security-related deprecations: as much notice as risk allows — often 2-4 weeks with direct communication.
- How do I know when it is safe to remove a deprecated endpoint?
- Monitor traffic to the deprecated endpoint via access logs or API analytics. When traffic drops to zero (or to a pre-defined acceptable threshold), it is safe to remove. Never remove based on calendar date alone — always verify with usage data.