First check whether it must break at all: adding fields and accepting optional parameters is backward compatible if clients ignore unknown fields. If it truly breaks, version explicitly, usually a path prefix for major versions, run both versions side by side against one internal model, publish a deprecation timeline with headers and metrics per version, and only remove the old one when traffic to it is effectively zero.
Why interviewers ask this
This is a judgment question about backward compatibility and operational discipline. The interviewer wants to hear that you avoid breaking changes where possible, that you can name what counts as breaking, and that you have actually retired an endpoint, which requires knowing who calls it. Answers that stop at putting v2 in the URL miss the hard part, which is the migration and the removal.
How to structure your answer
- Separate additive changes from genuinely breaking ones.
- Pick a versioning mechanism and justify it briefly.
- Describe how both versions coexist without duplicating logic.
- Lay out the deprecation and removal process with data.
Example answer
My first move is to check whether it needs to break. Adding a field, adding an optional parameter, adding an enum value if clients tolerate unknowns, all of that ships without a version bump. Breaking means removing or renaming a field, tightening validation, or changing the meaning of an existing value. When it is genuinely breaking, I use a major version in the path, because it is visible in logs and easy for clients to reason about, and I keep the old version as a thin translation layer over the same internal model so I am not maintaining two implementations. Then the part that actually takes the time: instrument requests per version per client, publish a sunset date in a response header and in the docs, and contact the top callers directly. On the last one I ran, traffic to v1 fell to a handful of requests a day from two integrations, we reached out, and it was safe to remove three months later. Without per client metrics you never get to delete anything.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- What changes do you consider safe to make without a version bump?
- How do you version events or message payloads rather than HTTP?
- What do you do about a large customer who refuses to migrate?
Related backend developer questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions