httpapiweb developmentrest

HTTP Status Codes: The Complete Developer Guide

Understand every HTTP status code - 1xx, 2xx, 3xx, 4xx, and 5xx - with explanations and when to use each one.

February 15, 2024ยท9 min read

HTTP Status Code Categories

HTTP status codes are 3-digit numbers grouped into five categories:

2xx Success

  • 200 OK - Standard success response
  • 201 Created - Resource successfully created (POST/PUT)
  • 204 No Content - Success with no response body (DELETE)
  • 206 Partial Content - Range request fulfilled

3xx Redirects

  • 301 Moved Permanently - SEO-friendly permanent redirect
  • 302 Found - Temporary redirect
  • 304 Not Modified - Cached response is still valid
  • 307/308 - Preserve HTTP method during redirect

4xx Client Errors

  • 400 Bad Request - Invalid request syntax
  • 401 Unauthorized - Authentication required
  • 403 Forbidden - Authenticated but not authorized
  • 404 Not Found - Resource doesn't exist
  • 422 Unprocessable Entity - Validation errors
  • 429 Too Many Requests - Rate limit exceeded

5xx Server Errors

  • 500 Internal Server Error - Generic server error
  • 502 Bad Gateway - Proxy received invalid upstream response
  • 503 Service Unavailable - Server temporarily down
  • 504 Gateway Timeout - Upstream timeout

Browse all codes in our HTTP Status Codes reference.