- Home
- API Design
- What are HTTP Status Codes?
HTTP Status Codes
The HTTPS Status codes are the 3-digit integer response from the server where the first digit indicates the class of response.
1xx: Informational
Communicates transfer protocol-level information.
STATUS | MEANING | DESCRIPTION |
---|---|---|
400 | Bad Request | The request could not be understood by the server due to incorrect syntax. The client SHOULD NOT repeat the request without modifications. |
401 | Unauthorized | Indicates that the request requires user authentication information. The client MAY repeat the request with a suitable Authorization header field |
402 | Payment Required | Reserved for future use. It is aimed at the use of digital payment systems. |
403 | Forbidden | Unauthorized request. The client does not have access rights to the content. Unlike 401, the client’s identity is known to the server. |
404 | Not Found | The server cannot find the requested resource. |
405 | Method Not Allowed | The request HTTP method is known by the server but has been disabled and cannot be used for that resource. |
406 | Not Acceptable | The server doesn’t find any content that conforms to the criteria given by the user agent in the Accept header sent in the request. |
412 | Precondition Failed | The client has indicated preconditions in its headers that the server does not meet. |
413 | Request Entity Too Large | The request entity is larger than the limits defined by the server. |
2xx: Success
Indicates that the client’s request was accepted successfully.
STATUS | MEANING | DESCRIPTION |
---|---|---|
200 | OK | Indicates that the request has succeeded. |
201 | Created | Indicates that the request has succeeded and a new resource has been created as a result. |
202 | Accepted | Indicates that the request has been received but not completed yet. It is typically used in log running requests and batch processing. |
203 | Non-Authoritative Information | Indicates that the returned meta information in the entity header is not the definitive set as available from the origin server, but is gathered from a local or a third-party copy. The set presented MAY be a subset or superset of the original version. |
204 | No Content | The server has fulfilled the request but does not need to return a response body. The server may return the updated meta information. |
205 | Reset Content | Indicates the client to reset the document which sent this request. |
206 | Partial Content | It is used when the Range header is sent from the client to request only part of a resource. |
207 | Multi-Status (WebDAV) | An indicator to a client that multiple operations happened, and that the status for each operation can be found in the body of the response. |
208 | Already Reported (WebDAV) | Allows a client to tell the server that the same resource (with the same binding) was mentioned earlier. It never appears as a true HTTP response code in the status line, and only appears in bodies. |
226 | IM Used | The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance manipulations applied to the current instance. |
3xx: Redirection
Indicates that the client must take some additional action in order to complete their request.
STATUS | MEANING | DESCRIPTION |
---|---|---|
300 | Multiple Choices | The request has more than one possible response. The user-agent or user should choose one of them. |
301 | Moved Permanently | The URL of the requested resource has been changed permanently. The new URL is given by the Location header field in the response. This response is cacheable unless indicated otherwise. |
302 | Found | The URL of the requested resource has been changed temporarily. The new URL is given by the Location field in the response. This response is only cacheable if indicated by a Cache-Control or Expires header field. |
303 | See Other | The response can be found under a different URI and SHOULD be retrieved using a GET method on that resource. |
304 | Not Modified | Indicates to the client that the response has not been modified, so the client can continue to use the same cached version of the response. |
305 | Use Proxy | Indicates that a requested response must be accessed by a proxy. |
306 | Switch Proxy | It is a reserved status code and is not used anymore. |
307 | Temporary Redirect | Indicates the client to get the requested resource at another URI with the same method that was used in the prior request. |
308 | Permanent Redirect | Indicates that the resource is now permanently located at another URI, specified by the Location header. |
4xx: Client Error
This category of error status codes indicates the error at the client.
STATUS | MEANING | DESCRIPTION |
---|---|---|
400 | Bad Request | The request could not be understood by the server due to incorrect syntax. The client SHOULD NOT repeat the request without modifications. |
401 | Unauthorized | Indicates that the request requires user authentication information. The client MAY repeat the request with a suitable Authorization header field |
402 | Payment Required | Reserved for future use. It is aimed at the use of digital payment systems. |
403 | Forbidden | Unauthorized request. The client does not have access rights to the content. Unlike 401, the client’s identity is known to the server. |
404 | Not Found | The server cannot find the requested resource. |
405 | Method Not Allowed | The request HTTP method is known by the server but has been disabled and cannot be used for that resource. |
406 | Not Acceptable | The server doesn’t find any content that conforms to the criteria given by the user agent in the Accept header sent in the request. |
412 | Precondition Failed | The client has indicated preconditions in its headers that the server does not meet. |
413 | Request Entity Too Large | The request entity is larger than the limits defined by the server. |
5xx: Server Error
The server takes responsibility for these error status codes.
STATUS | MEANING | DESCRIPTION |
---|---|---|
500 | Internal Server Error | The server encountered an unexpected condition that prevented it from fulfilling the request. |
501 | Not Implemented | The HTTP method is not supported by the server and cannot be handled. |
502 | Bad Gateway | The server got an invalid response while working as a gateway to get the response needed to handle the request. |
503 | Service Unavailable | The server is not ready to handle the request. |
504 | Gateway Timeout | The server is acting as a gateway and cannot get a response in time for a request. |
505 | HTTP Version Not Supported | The HTTP version used in the request is not supported by the server. |
511 | Network Authentication Required | Indicates that the client needs to authenticate to gain network access. |