API Design Interview Question

What are common HTTP status codes in an API?

Updated 2026-07-10 · Beginner friendly
Quick answer

HTTP status codes tell the client what happened with a request. They are grouped by the first digit: 2xx means success, 3xx means redirect, 4xx means the client made a mistake, and 5xx means the server failed. Common ones are 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, 404 Not Found, and 500 Internal Server Error.

The groups

The key distinction is 4xx versus 5xx. A 4xx means the client sent something wrong, like a bad body or missing token. A 5xx means the request was fine but the server broke while handling it.

In the interview

Know the difference between 401 and 403. 401 means you are not authenticated, so you need to log in, while 403 means you are logged in but not allowed. Mixing these up is a common mistake interviewers watch for.

Want the full API Design guide?

Read every API Design concept with notes, diagrams, and code in one place. Track your progress as you go.

Open the API Design guide All API Design questions