Why You Need to Understand APIs
The client or frontend needs to talk to the server. In essentially every case, the server exposes a set of functions it can perform via an API—that's the interface between them. You need to understand what an API is and how these are built, because APIs expose what functionality the server can offer to the client.
REST API Fundamentals
The most basic API you'll use in system design interviews is REST APIs. Master these first—they're what you'll rely on most of the time.
Make sure you understand:
- HTTP verbs — GET, POST, PUT, PATCH, DELETE and when to use each
- Routes — How to design clean, logical URLs for your resources
- Headers — Request and response metadata (Content-Type, Authorization, etc.)
- Body — Payload structure for requests (usually JSON)
- Responses — What you return and in what format
Status Codes
Know the common status code ranges:
| Range | Meaning | Examples |
|---|---|---|
| 2xx | Success | 200 OK |
| 3xx | Redirect | 301, 302 |
| 4xx | Client/user error | 400 Bad Request, 404 Not Found |
| 5xx | Server error | 500 Internal Server Error |
Understand what each signals and when to use them in your design.
Other Protocols
There are other ways to interact with the server:
- GraphQL — Flexible querying, often for complex or variable data needs
- RPC / gRPC — Remote procedure calls, common for service-to-service communication
- WebSockets — Persistent, bidirectional connections for real-time data
These are more niche and depend on the company or use case. REST APIs are the foundation. Use REST 70–80% of the time; reach for the others when the problem demands it.