Continue
InformationalThe initial part of a request has been received and the client should proceed with the request.
Complete reference for all HTTP status codes from 100 to 599. Search by number or keyword, inspect RFC definitions, common causes, developer fixes, and HTTP response examples.
The initial part of a request has been received and the client should proceed with the request.
The requester has asked the server to switch protocols and the server has agreed to do so.
The server has accepted the complete request, but has not yet completed it and no response is available yet.
Used to return some response headers before final HTTP message for resource preloading.
The request has succeeded. The meaning of the success depends on the HTTP method.
The request has been fulfilled and has resulted in one or more new resources being created.
The request has been accepted for processing, but the processing has not been completed.
The request was successful, but the enclosed payload has been modified from that of the origin server.
The server has successfully fulfilled the request and there is no additional content to send.
The server has fulfilled the request and desires that the client reset the "document view".
The server is delivering only part of the resource due to a Range header sent by the client.
A Multi-Status response conveys information about multiple resources in situations where multiple status codes might be appropriate.
Used inside a DAV:propstat response element to avoid enumerating internal members repeatedly.
The server has fulfilled a GET request for the resource and the response is a representation of instance manipulations.
The target resource has more than one representation, each with its own specific URI.
The target resource has been assigned a new permanent URI and any future references should use that URI.
The target resource resides temporarily under a different URI.
The server is redirecting the user agent to a different resource as indicated by a URI in the Location header.
The condition of a conditional GET or HEAD request has evaluated to false; resource has not changed.
Defined in a previous version of the HTTP specification, is now deprecated due to security concerns.
The target resource resides temporarily under a different URI, and MUST NOT change the request method.
The target resource has been assigned a new permanent URI, and MUST NOT change the request method.
The server cannot or will not process the request due to an apparent client error.
The request has not been applied because it lacks valid authentication credentials for the target resource.
Reserved for future use. Frequently used by SaaS APIs for subscription paywalls or unpaid balances.
The server understood the request but refuses to authorize it.
The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
The origin server did not find a current representation for the target resource.
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"error": "Not Found",
"message": "Resource '/api/v1/orders/987123' does not exist"
}The method specified in the request line is known by the server but is not supported by the target resource.
The target resource does not have a current representation that would be acceptable according to the Accept headers.
Similar to 401 Unauthorized, but indicates that the client needs to authenticate itself in order to use a proxy.
The server did not receive a complete request message within the time that it was prepared to wait.
The request could not be completed due to a conflict with the current state of the target resource.
The target resource is no longer available at the origin server and that this condition is likely to be permanent.
The server refuses to accept the request without a defined Content-Length header.
One or more conditions given in the request header fields evaluated to false when tested on the server.
The server is refusing to process a request because the request payload is larger than the server is willing or able to process.
The server is refusing to service the request because the request-target is longer than the server is willing to interpret.
The origin server refuses to service the request because the payload format is in an unsupported format.
None of the ranges in the request's Range header field overlap the current extent of the selected resource.
The expectation given in the request's Expect header field could not be met by at least one of the inbound servers.
Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot".
The request was directed at a server that is not able to produce a response.
The server understands the content type and syntax, but was unable to process the contained instructions.
The source or destination resource of a method is locked.
The method could not be performed because the action depended on another action and that action failed.
The server is unwilling to risk processing a request that might be replayed.
The server refuses to perform the request using the current protocol, but might be willing to do so after the client upgrades to a different protocol.
The origin server requires the request to be conditional.
The user has sent too many requests in a given amount of time ("rate limiting").
The server is unwilling to process the request because its header fields are too large.
The server is denying access to the resource as a consequence of a legal demand.
An Nginx-specific extension code indicating the client closed the connection before server could answer.
The server encountered an unexpected condition that prevented it from fulfilling the request.
The server does not support the functionality required to fulfill the request.
The server, while acting as a gateway or proxy, received an invalid response from an inbound server.
The server is currently unable to handle the request due to a temporary overload or scheduled maintenance.
The server, while acting as a gateway or proxy, did not receive a timely response from an upstream server.
The server does not support, or refuses to support, the major version of HTTP that was used in the request.
Transparent content negotiation for the request results in a circular reference.
The method could not be performed on the resource because the server is unable to store the representation.
The server terminated an operation because it encountered an infinite loop while processing a request with "Depth: infinity".
A mandatory extension policy for the request has not been accepted by the server.
The client needs to authenticate to gain network access.
Cloudflare was able to connect to its edge network, but the origin web server refused connection on port 80 or 443.
Cloudflare contacted the origin server, but the TCP handshake timed out.
| Class | Category | Definition & Core Purpose | Typical Client Action | Key Examples |
|---|---|---|---|---|
| 1xx | Informational | Interim response indicating request received and processing is underway. | Continue sending headers/payload or switch protocol. | 100, 101, 103 |
| 2xx | Success | The action requested by the client was received, understood, and accepted. | Process response payload or confirm action completion. | 200, 201, 204, 206 |
| 3xx | Redirection | Further action needs to be taken by user agent to complete the request. | Follow "Location" header URI or load resource from cache. | 301, 302, 304, 307, 308 |
| 4xx | Client Error | Request contains syntax error, unauthorized access, or unfulfillable terms. | Fix client payload, provide auth token, or adjust rate limit. | 400, 401, 403, 404, 422, 429 |
| 5xx | Server Error | The server is aware that it has erred or is incapable of performing the request. | Retry with exponential backoff or alert backend operations. | 500, 502, 503, 504 |
401 Unauthorized: Authentication failure. The request lacks valid credentials (missing or expired Bearer token, invalid API key). Re-authenticating with valid credentials resolves the error.
403 Forbidden: Authorization failure. The identity is verified, but the client lacks permission (insufficient RBAC role, restricted IP, or tenant restriction) to access the resource.
301 / 302 (Historical): Redirects where user agents historically permitted changing the request method from POST to GET.
307 / 308 (RFC 9110): Method-preserving redirects. 307 (Temporary) and 308 (Permanent) explicitly require clients to resend the exact same HTTP method (e.g. POST remains POST) with the original body.
500 Internal Server Error: Application crash inside your code (unhandled exception, null pointer, DB connection lost).
502 Bad Gateway: Reverse proxy (Nginx/Cloudflare) reached upstream backend, but backend crashed or refused connection.
503 Service Unavailable: Temporary server maintenance or overload; search engines pause without penalty.
504 Gateway Timeout: Upstream backend took longer than proxy read timeout (e.g. slow database query).
400 Bad Request: Syntax error in request. Malformed JSON syntax (trailing comma, unquoted key), broken query string, or invalid request headers.
422 Unprocessable Content: Syntax is 100% valid JSON, but business logic or schema validation fails (invalid email format, age < 0, date in the past).
| HTTP Verb | CRUD Semantics | Idempotent? | Safe? | Standard Success Status | Standard Error Statuses |
|---|---|---|---|---|---|
| GET | Read / Query | Yes | Yes | 200 OK, 206 Partial | 404, 401, 403, 304 |
| POST | Create / Action | No | No | 201 Created, 202 Accepted | 400, 422, 409, 415 |
| PUT | Replace / Upsert | Yes | No | 200 OK, 204 No Content | 400, 404, 412, 428 |
| PATCH | Partial Update | No | No | 200 OK, 204 No Content | 400, 404, 422, 409 |
| DELETE | Delete / Remove | Yes | No | 204 No Content, 202 Accepted | 404, 401, 403 |
| HEAD | Headers Only | Yes | Yes | 200 OK (no body) | 404, 304 |
| OPTIONS | CORS / Capabilities | Yes | Yes | 204 No Content, 200 OK | 405 Method Not Allowed |
HTTP status codes are standardized 3-digit numeric responses issued by a server in response to a client request (RFC 9110). The first digit specifies one of 5 distinct classes: 1xx Informational (request received, continuing process), 2xx Success (action successfully received, understood, and accepted), 3xx Redirection (further action needed to complete request), 4xx Client Error (request contains bad syntax or cannot be fulfilled), and 5xx Server Error (server failed to fulfill an apparently valid request).
The difference lies in identity versus permission. 401 Unauthorized indicates that the client lacks valid authentication credentials (e.g. missing or expired JWT, wrong API key); re-authenticating with valid credentials will solve the issue. In contrast, 403 Forbidden means the server recognizes who you are, but you do not possess sufficient permissions (e.g. an authenticated regular member attempting an admin-only route); re-authenticating as the same user will still yield 403.
301 Moved Permanently and 308 Permanent Redirect are permanent redirects that pass full SEO link equity (PageRank). 302 Found and 307 Temporary Redirect are temporary and do not transfer link equity. Regarding HTTP methods: historical user agents rewrote POST requests to GET upon receiving 301 or 302. To prevent method mutation, RFC 9110 introduced 307 (temporary) and 308 (permanent), which strictly forbid clients from altering the HTTP method (e.g. POST remains POST).
500 Internal Server Error is an unhandled exception or crash originating within the application code itself. 502 Bad Gateway indicates a reverse proxy (Nginx, Cloudflare, ALB) contacted the upstream application server, but received an invalid response or connection refusal. 503 Service Unavailable indicates the server is temporarily overloaded or undergoing maintenance (often returning a Retry-After header). 504 Gateway Timeout occurs when the reverse proxy connected to upstream, but upstream took longer than the configured timeout (e.g. 60s) to produce a response.
Return 400 Bad Request when the request has malformed syntax that prevents the server from even parsing the payload (e.g. invalid JSON with syntax errors, broken query parameter encoding, or missing required HTTP headers). Return 422 Unprocessable Content (RFC 9110 Section 15.5.21) when the payload syntax is perfectly valid (e.g. clean JSON), but contains semantic validation errors (e.g. email string fails regex, age number is negative, or password is too short).
404 Not Found indicates that the resource does not currently exist at the requested URI; search engines assume the removal might be accidental and will retry crawling the URL multiple times. In contrast, 410 Gone indicates the resource was intentionally and permanently removed with no forwarding address. Search engine bots (like Googlebot) interpret 410 as a definitive instruction to immediately purge the URL from search indexes and cease future crawling, saving crawl budget.
For POST (creation): return 201 Created with a Location header pointing to the new resource, or 202 Accepted if processing asynchronously. For PUT and PATCH (updates): return 200 OK with the updated entity, or 204 No Content if returning an empty body. For DELETE: return 204 No Content upon successful removal, or 202 Accepted if scheduled for deletion. For validation failures on any write verb: return 422 Unprocessable Content with error details.
When client request volume exceeds allowed thresholds, servers should return 429 Too Many Requests (RFC 6585) accompanied by a "Retry-After" header specifying the number of seconds or a GMT timestamp indicating when the client may retry. Well-architected APIs also include "X-RateLimit-Limit", "X-RateLimit-Remaining", and "X-RateLimit-Reset" headers so clients can proactively throttle requests before hitting limits.
According to RFC 9110 and RFC 9111, status codes 200 (OK), 203 (Non-Authoritative Information), 204 (No Content), 206 (Partial Content), 300 (Multiple Choices), 301 (Moved Permanently), 404 (Not Found), 405 (Method Not Allowed), 410 (Gone), 414 (URI Too Long), and 501 (Not Implemented) can be cached by default unless explicit Cache-Control headers (such as no-store or private) override this behavior.
RFC 9457 (superseding RFC 7807) establishes the "Problem Details for HTTP APIs" standard (Content-Type: application/problem+json). Instead of ad-hoc error schemas, compliant APIs return a standardized JSON structure with five canonical fields: "type" (URI reference identifying the problem type), "title" (short human-readable summary), "status" (the matching HTTP status code integer), "detail" (human-readable explanation specific to this occurrence), and "instance" (URI reference identifying the specific occurrence of the problem).