What do common HTTP status codes mean in an API?
PICTURE THIS: 1, 2, 2, 8
Simple meaning
2xx means success, 4xx means the client sent a bad request, and 5xx means the server failed.
WHY — HTTP instead of guessing?
Why interviewers care about HTTP:
who only read docs from people who shipped.
and tied to Full Stack work.
Name the idea, why it exists, then one short example.
End with when you use it and one common pitfall.
STEPS — What happens step by step?
Before you speak the answer, walk the interviewer through these steps:
- 12xx means success, 4xx
means the client sent a bad request, and 5xx means the server failed.
- 2Typical answers are 200
OK, 201 Created, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, and 500 Internal Server Error.
- 3The right code helps
clients, logs, and monitors react correctly.
- 4Give an example
One tiny concrete case you can say aloud.
- 5Common mistake
What juniors usually get wrong.
- 6Close
When you pick this over the alternative.
EXAMPLE — See it in action
Here's a short line you can speak, broken into clear beats:
Note: Adapt this scaffold to your own project — keep it under 60–90 seconds.
Key takeaway
2xx means success, 4xx means the client sent a bad request, and 5xx means the server failed. Typical answers are 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, and 500 Internal Server Error.