DSA Trainer
← System Design Foundations

System Design · Unit 3

API design basics

Early in a system design interview, after you have clarified requirements, you define the API: the exact set of requests a client is allowed to make and what each one does. It is the contract between the frontend (or another service) and your backend. Nail it down before you draw the architecture, because it forces you to state clearly what the system actually does.

You do not need to be an API expert. You need three things: a sensible way to name actions (REST), an understanding of why each request should stand on its own (statelessness), and the one idea that saves you from real bugs, making an operation safe to repeat (idempotency).

Get these and you can sketch a clean interface for any system, and answer the follow-up an interviewer loves: "what happens if the client retries?"

Goal: Define a clean API for a system: pick the right verb for each action, keep it stateless, and make operations safe to retry.
Premium unit

The rest of the System Design course is premium

The first two units are free, and this is where the gate sits. Unlocking premium opens this unit and everything else in both courses:

  • This unit: 4 prediction-first lessons, 3 applied drills, and a 5-question graded test
  • All 20 System Design units, caching to CAP & consistency
  • The full DSA course: every unit, guided problem, and drill

Cancel anytime. Not useful within 7 days? Email for a full refund.

Not sure yet? Start with the free units →