Customers & growth · Developer marketing
API versioning strategy
Best for Startup to Growth
Use it when
Your API has outside users and you need rules for shipping changes, labeling versions and retiring old ones without breaking their integrations.
Skip it when
- You have not settled the API's resources, naming and errors yet. Run API design principles first.
- A breaking change is decided and you need to walk users through it. Use Migration guide framework, which builds on this policy.
- You need to announce routine changes to users. Use Changelog framework.
What to apply first and what to use instead are listed below.
Approaches
Major version in the path
Every URL carries a major version such as v1, and a breaking change ships as a new major version run beside the old one.
- Pro Users see the version in every call, and old and new versions run side by side.
- Con Each major version bundles many changes into one large migration, so users put off upgrading.
Dated versions pinned per account
Each small set of breaking changes ships as a version named by its release date, each account stays on the version of its first call, and a header overrides it per request.
- Pro Upgrades are small, and existing integrations never break on their own.
- Con The server must translate responses back to every supported version, which needs dedicated tooling.
Version as a request parameter
Every call names a dated version in a query parameter, and paths carry no version.
- Pro Clients choose the version on each call, and a missing or unknown version fails with a clear error.
- Con Every client must send the parameter on every call, and the service keeps many dated versions working.
Inputs
- Public API surfaceThe endpoints, fields and error codes outside users rely on, from your API description.
- Breaking change rulesThe changes that count as breaking, such as removing or renaming a field, changing a type, adding a required field or changing meaning, from your style guide.
- Usage by versionCalls and active clients per version and endpoint over the last 90 days, from gateway logs.
- Planned changesChanges on the roadmap for the next two quarters, from product planning.
- Support commitmentsOptionalContract terms or published policies that promise a support period, from legal and sales.
Steps
- Write the breaking change rules, and tag every planned change as breaking or additive.
- Choose one version scheme and state where the version appears in each call.
- Set the deprecation policy with the minimum notice before retirement, the support period for each stability level and how users are told.
- Ship additive changes inside the current version, and group breaking changes into the next version with a changelog entry and a migration guide.
- Mark each deprecated version in its responses, for example with a Sunset header naming the shutdown date, and contact the clients still calling it.
- Review usage by version each month, and retire a version only after its notice period ends.
Output
A one-page versioning policy plus a version register listing every live version and its status.
- Version scheme and where the version appears
- Breaking change rules
- Notice period before retirement
- Support period per stability level
- Live versions with release dates
- Status of each version (current, deprecated or retired)
- Shutdown date for each deprecated version
- Active clients still on each deprecated version
Done when
- Every planned change is tagged breaking or additive by the written rules.
- The policy names one version scheme and a notice period in days or months.
- Every deprecated version has a shutdown date published in the docs and in its responses.
- Every client still calling a deprecated version has been contacted, with the date recorded.
- No breaking change has shipped inside a live version since the policy took effect.
Measure
Track calls and active clients on each deprecated version every month until shutdown, plus support tickets about broken integrations after each release. It worked when calls on deprecated versions fall steadily toward zero before the shutdown date, and broken integration tickets stay at or below your level before the policy. A version still carrying heavy traffic near its date needs more outreach or a longer notice.
Hypothetical example
Tallyhook, an invoicing API, pins each account to a dated version. The team planned four changes. A new currency field and a refunds endpoint were additive, so they shipped in the current version. Renaming the amount field and making the due date required were breaking, so both went into a new dated version with a changelog entry and a migration guide. The policy set 12 months of notice before any version retires. The oldest version still had 140 active clients, so the team set its shutdown date, added the Sunset header to its responses and emailed each client. Six months later 22 clients remained, and the team called each one.
Common mistakes
- Treating a renamed field or a new required field as a minor change. Check every change against the written breaking change rules.
- Shipping many breaking changes in one version. Keep each version small so users can upgrade in steps.
- Announcing a shutdown only in the changelog. Put the shutdown date in responses and contact the clients still calling the version.
- Changing behavior while keeping the same fields. A change in meaning or a large rise in latency also breaks clients, so version it.
- Supporting old versions with no retirement plan. Set notice and support periods so the cost of old versions stops growing.
Sources
- APIs as infrastructure: future-proofing Stripe with versioning · Brandur Leach, 2017
- AIP-185: API versioning · Google API Improvement Proposals, 2024
- Microsoft Azure REST API Guidelines · Microsoft, 2026
Show all 6 sources
- Microsoft Graph REST API Guidelines · Microsoft
- Semantic Versioning 2.0.0 · Tom Preston-Werner
- RFC 8594: The Sunset HTTP Header Field · Erik Wilde, 2019
By company stage
Apply first
Nothing. You can start here.
Use instead
- API design principles
You have not settled the API's resources, naming and errors yet. Run API design principles first.
- Migration guide framework
A breaking change is decided and you need to walk users through it. Use Migration guide framework, which builds on this policy.
- Changelog framework
You need to announce routine changes to users. Use Changelog framework.
Where it sits
Open the developer marketing roadmapRecommended resources
No sponsored resources on this framework yet. Sponsored listings would be labelled here, never in search.
Progress is not saved until you have an account. Create a free account