HTTP Status Codes Explained

Part 3 — reading the server's verdict on every request.

By SixQuality · API Testing

Every HTTP response carries a three-digit status code that tells you, at a glance, how the request went. Grouping them by their first digit makes them easy to remember.

5xx — Server errorthe server failed
4xx — Client erroryour request was wrong
3xx — Redirectiongo somewhere else
2xx — Successit worked

The codes you will test most

CodeMeaning
200 OKRequest succeeded
201 CreatedResource created (after POST)
400 Bad RequestInvalid input from the client
401 UnauthorizedAuthentication missing or invalid
403 ForbiddenAuthenticated but not allowed
404 Not FoundResource does not exist
500 Server ErrorSomething broke on the server
Test both sides: good API testing checks not just the happy-path 200s, but also that errors return the correct code — a bad input should give 400, not 500, and missing auth should give 401.

Conclusion

Status codes are the server's verdict on each request, grouped logically by category. Asserting on the right code — for both success and failure — is one of the most important checks in any API test.

← Previous: 2. HTTP Methods (GET, POST, PUT, DELETE) Next: 4. Headers, Query & Path Parameters →