API Directory โ€บ Guides โ€บ API Versioning Explained (v1, v2 and Why It Matters)

API Versioning Explained (v1, v2 and Why It Matters)

APIs change over time โ€” versioning lets them evolve without breaking your app. Here's how v1/v2 works and how to stay on a stable version.

APIs change. Versioning is how a provider ships those changes without breaking the apps already using the old behaviour. As a consumer, your job is to know which version you are on and to move deliberately when you need to.

Where the version lives

In the URL pathhttps://api.example.com/v1/users. The most common and most visible. Bumping to /v2/ is an explicit choice.
In a headerAccept: application/vnd.example.v2+json or a custom X-API-Version: 2. Keeps URLs clean.
As a dateStripe-Version: 2024-06-20 or ?v=20240620 (Wit.ai). Your account is pinned to the version in force when you started; you upgrade explicitly.
Not at allGraphQL APIs typically don’t version — they add fields and deprecate old ones instead.

What counts as a breaking change

Non-breaking (usually shipped without a version bump): adding a new optional field, a new endpoint, a new optional parameter, or a new enum value — which is why your code should ignore unknown fields and handle unexpected enum values gracefully.

How providers deprecate a version

What you should do

FAQ

Should I always use the latest API version?

Not automatically. Use a version you have tested against and pin it. Upgrade deliberately, following the migration guide, rather than letting the provider’s default shift under you.

What is a ‘breaking change’?

Any change that could make a correct existing integration start failing: removing or renaming fields, changing types or defaults, tightening validation, or changing auth.

Why don’t GraphQL APIs have versions?

Because clients request specific fields, the server can add new fields freely and mark old ones @deprecated without a version bump. Removal still happens, just gradually.

How will I know a version I use is being retired?

Watch for Deprecation/Sunset headers and body warnings, and subscribe to the provider’s changelog. Don’t rely on catching an email.

Keep going

Try it on a real API

Browse all 196 free APIs โ†’

๐Ÿ”Œ Explore free public APIs

Hundreds of free APIs, searchable by category, with auth & CORS at a glance.

Browse the directory โ†’