How Status Codes Are Grouped
HTTP status codes are three-digit numbers divided into five groups:
- 1xx: Informational (request received, continuing process)
- 2xx: Success (action successfully received, understood, and accepted)
- 3xx: Redirection (further action must be taken to complete the request)
- 4xx: Client Error (the request contains bad syntax or cannot be fulfilled)
- 5xx: Server Error (the server failed to fulfill an apparently valid request)
Successful Responses (2xx)
- 200 OK: The standard success code. The payload is returned in the response.
- 201 Created: The request succeeded and a new resource was created.
- 204 No Content: Succeeded but returns no body (common for DELETE requests).
Redirect Responses (3xx)
- 301 Moved Permanently: The resource has been moved to a new canonical URL.
- 302 Found: The resource resides temporarily at a different URL.
- 307/308: Modern equivalents of 302/301 that prevent browsers from changing the HTTP method (e.g. changing POST to GET) on redirect.
Client Errors (4xx) and Server Errors (5xx)
- 400 Bad Request: Malformed request syntax.
- 401 Unauthorized: Lacks authentication credentials.
- 403 Forbidden: Authenticated but lacks permissions.
- 404 Not Found: The resource could not be found.
- 500 Internal Server Error: The server encountered an unexpected error.
- 503 Service Unavailable: The server is overloaded or down for maintenance.
