Prompt
How do I document multiple API versions without confusing users?
Latest observation
A good rule is: optimize for a single “current path,” then make older versions easy to find but hard to confuse with the current one.
Here are practical ways to do that:
1. Pick one version as the default entry point
- Put the newest or recommended version front and center.
- Use the homepage, quickstart, and examples for that version only.
- Label older versions clearly as legacy, deprecated, or maintenance.
2. Separate versions cleanly
You can organize docs by:
- Path-based versioning:
/docs/v1/,/docs/v2/ - Tabbed or switchable docs:
One page with a version selector, if the content is mostly similar. - Separate sections by version:
Good if only a few pages differ, but can get confusing at scale.
If versions differ a lot, separate doc sets are usually clearer.
3. Keep the same structure across versions
For each version, use the same navigation and page names:
- Authentication
- Endpoints
- Errors
- Pagination
- Webhooks
- SDKs
This helps users compare versions quickly.
4. Clearly mark what changed
Add a short “What’s new in v2” or “Migration from v1” page:
- Breaking changes
- Renamed fields
- Removed endpoints
- New defaults
- Required migration steps
This is often more useful than forcing users to read both docs.
5. Show the version in examples
Make sure code samples, request/response examples, and endpoint paths include the version:
/v1/orders/v2/orders
Also show:
- API base URL
- Required headers
- Response shapes
- SDK versions if applicable
6. Cross-link between versions
Include clear links like:
- “Looking for v1 docs?”
- “Migrating from v1 to v2?”
- “v2 documentation”
But avoid overwhelming every page with too many version banners.
7. Avoid mixing version content on the same page
If a page contains both v1 and v2 behavior, users can miss the differences. Better options:
- separate pages
- a comparison table
- a migration guide
- inline version callouts
8. Use visual cues consistently
For example:
- Color-coded version badges
- “Current” and “Legacy” labels
- Persistent version selector in the header
- A warning box for deprecated versions
9. Add an explicit support policy
Users want to know:
- Which versions are supported
- For how long
- When old versions will be removed
- Whether docs reflect supported or historical behavior
A simple “API versioning policy” page reduces confusion a lot.
10. Test the docs with real users
Ask:
- Can they tell which version to use?
- Can they find migration guidance in under 30 seconds?
- Do they accidentally land in old docs and think they’re current?
If yes, adjust navigation and labels.
A simple recommended setup
If you want the least confusing approach:
- Make v2 the default docs
- Put v1 in a separate legacy section
- Add a migration guide
- Use the same nav structure for both
- Clearly label version and support status everywhere important
If you want, I can also suggest:
- a docs information architecture for multi-version APIs, or
- a sample sidebar/nav structure you can copy.