← Integration Engineering
Integration Engineering

An API Can Break Your Code Without You Changing a Line

9 Oct 2026·3 min read

My LinkedIn tool sent version 202503 with every request. I wrote it once and forgot it. LinkedIn’s own migrations page lists 202503 as retired on March 16, 2026. My posts still went through in September 2026. That was luck, not a plan.

Why APIs have versions

Thousands of apps depend on an API’s current shape. So many APIs use versions: you say which one you want, and it keeps answering the same way. Some put it in the URL, like /v2/. Others use a header. GitHub, for example, uses X-GitHub-Api-Version:

curl -si -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/zen
I ran this while writing: 200 OK, and the reply said x-github-api-version-selected: 2022-11-28. If you ask GitHub for a version it no longer supports, you get 410 Gone.

How to stay safe

  • Pin the version you tested with, so changes do not surprise you.
  • Read the provider’s changelog. It tells you what changed and when old versions stop.
  • Keep the version in one place in your code, not copied into ten files.
  • Put the retire date in your calendar. Upgrading calmly beats fixing it on the day it breaks.

My tool now works out the version from today’s date, and steps back a month if LinkedIn answers 426 (upgrade required). That goes against pinning a little, and I chose it for a small tool. For a payment system I would pin and upgrade by hand.

Do this in 60 secondsSearch your code for the API version you send. If it appears in more than one place, move it into one constant. Then look for a retire date in the provider’s changelog.
Today’s AI angleAI models learned from old docs, so generated code often uses a version that may be retired now. Check it against the provider’s current docs. Let the tool pin the version, not the model.
An API Can Break Your Code Without You Changing a Line · Ali Huzaifa