Skip to content
RED SAGSkills
mediumBackend Developer interview question

How do you change a public API without breaking existing clients, such as old mobile app versions?

What the interviewer wants to hear

  • Prefer additive, backward-compatible changes
  • Version breaking changes (URL or header)
  • Deprecation policy with timelines and communication
  • Monitor usage of old versions before removing
  • Contract tests and documentation

Model answer

Old mobile apps can stay installed for years, so I treat the API as a contract. Most changes should be additive: adding optional fields or new endpoints does not break clients that ignore unknown fields. Breaking changes, like renaming or removing a field or changing its type, go into a new version, for example /v2/orders or a version header, while v1 keeps working. I keep both versions on the same business logic with a thin mapping layer. Then I announce a deprecation timeline, add Deprecation and Sunset headers, and track how many requests still hit v1, per client version. Only when traffic is near zero, or the app forces an update, do I remove it. I use OpenAPI docs and contract tests in CI to catch accidental breaking changes before release.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Backend Developer questions