API Status Code Guide

Informational Responses

  • 100 - Continue: The server has received the request headers, and the client should proceed to send the request body.
  • 101 - Switching Protocols: The requester has asked the server to switch protocols, and the server has agreed to do so.
  • 102 - Processing: The server has received and is processing the request, but no response is available yet.
  • 103 - Early Hints: The server is likely to send a final response with the headers provided, allowing the client to start preloading resources.


Success

  • 200 - OK: Success! Everything worked as expected.
  • 201 - Created: Great! Your item has been successfully created.
  • 202 - Accepted: The request has been accepted for processing, but the processing is not yet complete.
  • 203 - Non-Authoritative Information: The server successfully processed the request, but the response comes from a copy or modified version of the original resource.
  • 204 - No Content: The server successfully processed the request, but there is no content to return.
  • 205 - Reset Content: Reset Content: Tells the client to reset the document view (e.g., form inputs) as the response does not include new content.
  • 206 - Partial Content: The server is delivering only part of the resource due to a range header sent by the client.
  • 207 - Multi-Status: Indicates multiple statuses for various operations in a Web Distributed Authoring and Versioning (WebDAV) request, often used with XML.
  • 208 - Already Reported: Used inside a DAV:propstat response to avoid repeatedly enumerating the internal members of multiple bindings to the same collection.
  • 226 - IM Used (HTTP Delta Encoding): The server has fulfilled the request for the resource, and the response represents the result of one or more instance-manipulations applied to the current instance.


Redirection

  • 300 - Multiple Choices: There are multiple options that the client may follow.
  • 301 - Moved Permanently: The requested resource has been moved to a new URL permanently.
  • 302 - Found: Redirects the client to a different URL temporarily; commonly used for redirecting web browsers.
  • 303 - See Other: Directs the client to retrieve the requested resource at a different URI using a GET method.
  • 304 - Not Modified: The content has not been modified since the last request. The client can continue to use the cached version.
  • 305 - Use Proxy: Specifies a proxy server for the requested resource. (Not widely used due to security issues).
  • 306 - Unused: Originally intended as a "Switch Proxy" response code but is no longer used.
  • 307 - Temporary Redirect: The requested resource temporarily resides under a different URL, but future requests should still use the original URL.
  • 308 - Permanent Redirect: The resource has been permanently moved to a new URL, and future requests should use the new URL.


Client Errors

  • 400 - Bad Request: The request cannot be fulfilled due to bad syntax.
  • 401 - Unauthorized: It appears that the password and/or username you entered was incorrect.
  • 402 - Payment Required: Reserved for future use to indicate payment is required before accessing the requested resource (often seen in subscription-based services).
  • 403 - Forbidden: Sorry, employees and staff only.
  • 404 - Not Found: We're sorry, but the page you're looking for is missing, hiding, or maybe it moved somewhere else and forgot to tell you.
  • 405 - Method Not Allowed: The method specified in the Request-Line is not allowed for the specified resource.
  • 406 - Not Acceptable: The server cannot provide a response matching the Accept headers in the request, indicating the client should modify its request.
  • 407 - Proxy Authentication Required: The client must authenticate itself with the proxy before the request can be processed.
  • 408 - Request Timeout: Your browser failed to send a request in the time allowed by the server.
  • 409 - Conflict: The request could not be completed due to a conflict with the current state of the resource.
  • 410 - Gone: The requested resource is no longer available on the server and no forwarding address is provided, indicating permanent unavailability.
  • 411 - Length Required: The server requires a valid Content-Length header for the request to be fulfilled.
  • 412 - Precondition Failed: One or more conditions in the request headers were not met, so the server refuses to process it.
  • 413 - Payload Too Large: The request payload is too large for the server to process, prompting the client to reduce the payload size.
  • 414 - URI Too Long: The URL you entered is longer than the maximum length allowed by the server.
  • 415 - Unsupported Media Type: The server does not support the media format of the request payload, so it cannot be processed.
  • 416 - Range Not Satisfiable: The server cannot fulfill the range specified by the client, often seen in range requests for downloading files.
  • 417 - Exception Failed: The server cannot meet the requirements in the Expect request header.
  • 418 - I'm a teapot: An April Fool’s joke code from the Hyper Text Coffee Pot Control Protocol (HTCPCP) indicating the server refuses to brew coffee because it's a teapot.
  • 421 - Misdirected Request: The request was directed at a server that is not able to produce a response (e.g., for server misconfiguration or load balancing issues).
  • 422 - Unprocessable Entity: The request was well-formed but couldn't be processed due to validation errors. Please check your input.
  • 423 - Locked: The requested resource is currently locked (often in WebDAV when a file or resource is in use by another process).
  • 424 - Failed Dependency: The request failed because it depended on another request that also failed (typically used in WebDAV).
  • 425 - Too Early: The server is not willing to risk processing a request that might be replayed (to avoid premature replay attacks).
  • 426 - Upgrade Required: The client should switch to a different protocol as specified in the Upgrade header (often seen in cases requiring HTTPS instead of HTTP).
  • 428 - Precondition Required: The server requires the request to be conditional to prevent unintended overwrites or modifications (e.g., ensuring If-Match headers are used).
  • 429 - Too Many Requests: The user has sent too many requests in a given amount of time, triggering rate-limiting mechanisms.
  • 431 - Request Header Fields Too Large: The server refuses to process the request due to excessively large header fields.
  • 451 - Unavailable for Legal Reasons: The server cannot process the request due to legal restrictions on content (e.g., censorship laws).
  • 499 - Client Closed Request: The client closed the connection before the server could send a response (common in Nginx to indicate a client timeout).


Server Errors

  • 500 - Internal Server Error: The request was unsuccessful due to an unexpected condition encountered by the server.
  • 501 - Not Implemented: The server does not support the functionality required to fulfill the request.
  • 502 - Bad Gateway: The server received an invalid response from the upstream server while trying to fulfill the request.
  • 503 - Service Unavailable: The server is currently unable to handle the request due to temporary overloading or maintenance.
  • 504 - Gateway Timeout: The upstream server failed to send a request in the time allowed by the server.
  • 505 - HTTP Version Not Supported: The server does not support the HTTP version specified in the request.
  • 507 - Insufficient Storage: The server cannot store the representation needed to complete the request (common in WebDAV when storage space is full).
  • 508 - Loop Detected: The server detected an infinite loop while processing the request (common in WebDAV for cyclic resource references).
  • 510 - Not Extended: The server requires further extensions to fulfill the request, often needing additional specifications.
  • 511 - Network Authentication Required: The client needs to authenticate to access the network, typically used for captive portals in public Wi-Fi.
  • 599 - Network Connect Timeout Error: Indicates a network connection timeout at the network level, often used in unofficial custom server logs.