Skip to the guide

Versioning and backward compatibility

IntermediateConcept3 pages

Once an API has users, you can't change it the way you change your own code. Old app versions stay on phones for years, partners update on their own schedule, and during every deploy your old and new servers run side by side. Interviewers ask how you'd change an API without breaking anyone. The best answer is mostly about never needing a new version at all.

A city renaming a street

A city wants to rename Station Road to Harbour Road. Opening a brand-new street costs nobody anything. Renaming one is different: maps, saved addresses and parcels already in the post all say Station Road. So the city puts up both signs, the post office delivers to either name, the change is announced well ahead, and only years later does the old sign come down.

  • opening a new street → an additive change: a new field or endpoint, safe for everyone
  • renaming a street → a breaking change: old clients still use the old name
  • both signs up → serving the old and new fields, or versions, side by side
  • the announcement, and the day the old sign comes down → deprecation and sunset