How do API version deprecation policies govern the retirement lifecycle of legacy Salesforce integration endpoints?
Answer
Basics: Every release adds an API version (for example Spring, Summer and Winter each increment by 1.0). Clients call endpoints with the version in the URL (/services/data/v62.0/...). Salesforce commits to backward compatibility for a long time, but it announces retirements of the oldest versions (for example versions 21.0 through 30.0 were scheduled for retirement in Summer '25) and later groups follow. After retirement, calls return an error (HTTP 410 for REST) instead of working.
How it works:
- Salesforce announces a retirement date via release notes, Help and in-app/ email notifications to admins.
- Use Event Monitoring (API Total Usage event) or the "Legacy API usage" tools in Setup to find which clients, users and versions call retiring versions.
- Update client code, middleware, packages and integrations to a current version; retest.
- Update sourceApiVersion in sfdx-project.json and Apex/LWC meta files deliberately and test.
Advanced / deep dive: Different surfaces have different version rules: REST/SOAP/Bulk endpoints are versioned by URL; Apex classes, triggers, Visualforce pages, LWC and Flows each have their own API version stored in metadata, which controls behavior of platform features at design time. Deprecation affects connected tools too (Data Loader, ETL connectors, managed packages); keep them updated. Some changes (for example the planned removal of SOAP login() in later API versions; verify the schedule) are authentication related, so plan migration to OAuth flows. Governance: keep an integration inventory with owner, version and last-test date, and add a "no older than N versions" policy. Always check the Salesforce Help topic on API version retirement for the current schedule.
Code / config example:
GET /services/data/ -> lists supported versions (JSON)
GET /services/data/v66.0/limits -> use a current version in new code
sfdx-project.json: "sourceApiVersion": "66.0"
SOQL on Event Monitoring log: EventType = 'ApiTotalUsage' (API_VERSION column)