API Design Interview Guide
Every question uses the same frame: what it tests, progressively stronger answers, green flags, red flags, follow-up and a practical scenario. Strong candidates reason from consumers, guarantees and evolution — not endpoint conventions.
A client sends a payment request, times out, and retries. How should the API behave?
You're adding pagination to a list endpoint. Offset or cursor pagination — how do you decide?
When does an API need a new version — and when doesn't it?
A team is building a new service API and asks: REST or gRPC? What do you ask them before answering?
Design the error response for a payments API. What does a client need to see when a request fails?
What's the difference between PUT and PATCH, and when does the choice actually matter?
A user requests a resource that exists but they may not access it — 403 or 404? Why might you choose either?
Two clients load the same resource, both edit it, and both save. Design the API so the second save doesn't silently destroy the first.
Generating a report takes 15 minutes. How do you design the API for it?
Design webhook delivery for a payments platform. What must the contract cover for consumers to build something reliable?
Your API rate-limits clients. What should a 429 response contain, and what should the rate-limit contract promise?
A team wants to adopt GraphQL to “fix over-fetching and the N+1 calls from mobile”. What does GraphQL actually buy, and what does it cost?
A client submits a batch of 5 operations and 2 fail. What should the API do — and what must the contract have said beforehand?
Is renaming response field `status` to `state` a breaking change? How would you actually do it?
When is an API key enough, and when do you need delegated authorization like OAuth?
When does a backend-for-frontend earn its complexity — and when is it just another service to keep alive?