What are the API versioning strategies, and which do you choose for a public API?
⚡ Short Answer
URI versioning (/v1/orders) — simplest, most visible, most common. Header/media-type versioning (Accept: ...v2+json) — cleaner URLs, harder to test. Query param (?version=2) — easy but messy. For public APIs, URI versioning wins on clarity; whichever you pick, additive changes shouldn't need a new version.
☕Coffee Chat Question
Concept Made Simple
“What are the API versioning strategies, and which do you choose for a public API?”
🧠Mind Map Answer
Remember It Faster
🔥What If?
Think Beyond the Expected
Which changes require a new API version vs which are safe to add in place?
Additive, non-breaking changes (new optional fields, new endpoints, new optional params) should NOT bump the version — clients ignore what they don't know. Only breaking changes (removing/renaming fields, changing types/semantics, making a field required) warrant a new version.
😂Real World
Most public APIs (Stripe, GitHub) version deliberately and rarely; the discipline is designing additively so you almost never need v2 — versioning is the escape hatch, not the default.
🎯Interviewer's Expectation
Keywords they're listening for:
⚠️Common Mistakes
- ✗Versioning for additive changes
- ✗Never deprecating old versions
- ✗Inconsistent versioning across endpoints
✅Best Practices
- ✓Design additively to avoid version bumps
- ✓Version on breaking changes only
- ✓Publish a deprecation policy/timeline
🔁Follow-up Questions
- 1How does Stripe version with a date header?
- 2What counts as a breaking change?
- 3How long do you support old versions (deprecation)?
🧩Related Technologies
Continue Learning with AI
Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly — AI is your learning companion, not a shortcut.
Plain-language foundations
I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner. Topic: Versioning (REST APIs) Interview question: "What are the API versioning strategies, and which do you choose for a public API?" Please: 1. Explain the core idea in simple, plain language, using an everyday analogy. 2. Define any technical terms you use. 3. Walk through one small, concrete example. 4. Finish with a single sentence I can easily remember. Keep the tone friendly and assume I'm new to this topic.
Was this answer helpful?
⭐ Featured Products
Support our platform by exploring our recommended products.
As an Amazon affiliate, purchases through these links may earn us a small commission — at no extra cost to you. It helps keep Full Stack Interview Guru free.