Cheatsheet

HTTP status codes

Not every code, just the ones you send and debug in real APIs — grouped by class.

2xx — Success

200 OKStandard success with a body.
201 CreatedA resource was created (return its URL in Location).
204 No ContentSuccess with nothing to return (e.g. a DELETE).

3xx — Redirect

301 Moved PermanentlyThe resource has a new permanent URL (SEO passes here).
302 / 307 Found / TemporaryTemporary redirect; 307 preserves the method.
304 Not ModifiedCached copy is still fresh — used with conditional requests.

4xx — Client error

400 Bad RequestMalformed input the client should fix.
401 / 403401 = not authenticated; 403 = authenticated but not allowed.
404 Not FoundNo such resource.
422 UnprocessableWell-formed but semantically invalid (validation failed).
429 Too Many RequestsRate limit hit — include a Retry-After header.

5xx — Server error

500 Internal Server ErrorSomething broke on your side — never leak the stack trace.
502 / 503 / 504Bad gateway / service unavailable / gateway timeout — upstream problems.