# Pattern: API Version Deprecation ## Symptom An integration that worked yesterday starts returning 400/401/404 or generic errors. Vendor documentation mentions an older API version is deprecated or sunset. Calls using the old version silently stop working or return migration messages. ## Affected Projects - LinkedIn content automation (LinkedIn REST API version deprecation) ## Root Cause External SaaS APIs version their endpoints and periodically retire old versions. Hard-coded version strings in workflows or apps become liabilities when the vendor changes the supported window. ## Standard Fix 1. Record the API version in use at design time, plus where to check for deprecation notices (vendor developer portal, changelog, email alerts). 2. Centralize API version strings in environment variables or config, not scattered through code. 3. Subscribe to vendor developer changelogs or status pages. 4. Plan version migration as a tracked task rather than an emergency fix. 5. Add a lightweight health check that verifies the integration still responds with expected schema/version fields. ## When to Apply - Every new external API integration. - Any existing integration that has no documented API version or deprecation monitoring. ## Verification - Vendor docs show the version is current and supported. - Health check returns expected version/schema fields. - A deprecation monitoring source is identified and checked. ## Related Patterns - `credential-rotation-recovery`