🎞️API Versioning Strategy Guide

Generate the request each versioning style produces and compare what it costs in caching.

What each style breaks

StyleCachingLink sharingClient changesVisible to proxies
URL pathSplits on its own because addresses differThe address alone reproduces itOne base address to changeVisible
Custom headerWithout Vary, responses for different versions get mixedThe address alone carries no versionEvery place that builds a request adds the headerOnly by inspecting headers
Query parameterSplits because addresses differ, but is sensitive to a missing parameterThe address alone reproduces itEvery place that builds a query string adds itVisible
Accept negotiationNeeds Vary: Accept and lowers the cache hit rateThe address alone carries no versionThe client handles Accept directlyOnly by inspecting headers

No style is declared the recommended one. There is no authoritative recommendation, and the trade-off turns on where your caches sit and how much control you have over clients. This tool shows what each style breaks and generates the matching request.

You Might Also Need

About this tool

Choose whether the version sits in the path, in a header, in a query parameter or in Accept negotiation, and the tool shows the request that style actually produces. The request line and headers are written out, together with a shell command that sends the same thing. Changing the host, path, version number, header name or vendor token updates the result immediately.

Alongside that it works out the effect on caching and sharing. How many addresses point at one resource, how many cache entries exist across versions, whether a Vary response header is required and whether the address alone reproduces the result all differ by style. Distinguishing versions by header or Accept without sending Vary lets a shared cache hand the version it stored first to a client asking for another.

No style is declared the recommended one. As of October 2026 there is no authoritative recommendation, and the trade-off turns on where your caches sit and how much control you have over clients. The tool does not judge when to raise a version number and does not check whether compatibility broke.

Frequently asked questions

Why does header versioning need Vary?

A shared cache keys responses on the address by default. When the address is the same but the content depends on a header, the version stored first is handed to a client that asked for another. Naming that header in the Vary response header makes the cache include the header value in its key.

Is an X- prefix on a header name wrong?

It is a practice that is no longer recommended. Prefixing a non-standard header with X- means that if the header is later standardised, both the prefixed and unprefixed names are in circulation. Starting without the prefix avoids that.

What does this tool not do?

It does not pick a recommended style, judge when to raise a version or check whether compatibility broke. It generates request examples and computes cache and sharing effects.