📡 You're offline — showing cached content
New version available!
Quick Access
Tutorials API Design HTTP Status Codes

HTTP Status Codes

5 min read Quiz at the end
2xx success, 4xx client errors, 5xx server errors — use precise status codes for clear API communication.

HTTP Status Codes

RangeMeaningCodes
2xxSuccess200 OK, 201 Created, 204 No Content
3xxRedirect301 Moved, 304 Not Modified
4xxClient Error400 Bad Request, 401 Unauth, 403 Forbidden, 404 Not Found, 422 Unprocessable, 429 Rate Limited
5xxServer Error500 Internal, 502 Bad Gateway, 503 Unavailable
201 Created  + Location: /api/users/42
204 No Content
400 Bad Request  -- validation errors
401 Unauthorized + WWW-Authenticate header
429 Too Many Requests + Retry-After: 60
Topic Quiz · 3 questions

Test your understanding before moving on

1. Which status code should be returned after successfully creating a resource with POST?
💡 201 Created is the correct response for a successful POST that creates a new resource.
2. What status code indicates a client sent an invalid request (missing required field)?
💡 400 Bad Request indicates the client sent a malformed or invalid request.
3. What HTTP status code means the rate limit was exceeded?
💡 429 Too Many Requests is the standard rate-limiting response, often paired with a Retry-After header.