API Versioning, Done Properly
Managing changes to an API so existing clients keep working, using version numbers, deprecation periods and change policies.
On this page
What is at stake
Breaking changes without versioning disrupt integrations and customers, and a clear policy makes change predictable.
The playbook
- Avoid breaking changes where possible
- Version when breaking changes are unavoidable
- Announce deprecations with timelines
- Document changes in a changelog
- Monitor usage of old versions
Where it goes wrong
Avoid:
- Silent breaking changes
- Supporting too many versions indefinitely
- No deprecation notices
- Undocumented changes
The numbers behind it
| Measure | Figure |
|---|---|
| Approaches | versions in URLs, headers or media types |
| Breaking changes | removing fields or changing behavior |
| Deprecation | announcing removals in advance |
| Sunset header | RFC 8594 defines a header for announcing retirement dates |
Getting outside help
When to hand it over: Bring in help when public APIs need to evolve without breaking partners.
Where this comes from
- RFC Editor — RFC 8594 The Sunset HTTP Header Field
- Microsoft Learn — Web API design best practices
The figures and practices above come from the sources listed.
Working on something like this?
We take on Web Design & Development work for teams who want it done once, properly. Tell us what you are building and we will tell you honestly whether we are the right studio for it. Start a project.
Where to go next
Spotted something wrong? Report an error on this page. We correct on the page and say what changed.