HTTP Status Codes Reference
Complete reference of HTTP status codes with descriptions
1xx Informational (4)
Continue
The server has received the request headers and the client should proceed to send the request body.
Switching Protocols
The server is switching protocols as requested by the client.
Processing
The server is processing the request but no response is available yet.
Early Hints
Used to return some response headers before final HTTP message.
2xx Success (10)
OK
The request has succeeded. The meaning of success depends on the HTTP method.
Created
The request has been fulfilled and a new resource has been created.
Accepted
The request has been accepted for processing, but processing has not been completed.
Non-Authoritative Information
The returned metadata is not exactly the same as available from the origin server.
No Content
The server successfully processed the request but is not returning any content.
Reset Content
The server successfully processed the request and is asking the client to reset the document view.
Partial Content
The server is delivering only part of the resource due to a range header sent by the client.
Multi-Status
The message body contains multiple status codes for multiple independent operations.
Already Reported
Members of a DAV binding have already been enumerated and are not included again.
IM Used
The server has fulfilled a request for the resource with instance-manipulations applied.
3xx Redirection (8)
Multiple Choices
The request has more than one possible response. The user should choose one of them.
Moved Permanently
The URL of the requested resource has been changed permanently. The new URL is given in the response.
Found
The URI of the requested resource has been changed temporarily. Further changes might be made in the future.
See Other
The server sent this response to direct the client to get the resource at another URI with a GET request.
Not Modified
The response has not been modified, so the client can continue to use the cached version.
Use Proxy
The requested resource is only available through a proxy, the address is provided in the response.
Temporary Redirect
The server sends this to direct the client to get the resource at another URI with the same method.
Permanent Redirect
The resource is now permanently located at another URI, specified in the Location header.
4xx Client Error (29)
Bad Request
The server could not understand the request due to invalid syntax.
Unauthorized
The client must authenticate itself to get the requested response.
Payment Required
Reserved for future use. Originally meant for digital payment systems.
Forbidden
The client does not have access rights to the content. Unlike 401, identity is known to the server.
Not Found
The server cannot find the requested resource. The URL is not recognized.
Method Not Allowed
The request method is known by the server but not supported by the target resource.
Not Acceptable
The server cannot produce a response matching the list of acceptable values in the request headers.
Proxy Authentication Required
Similar to 401 but authentication is needed to be done by a proxy.
Request Timeout
The server would like to shut down this unused connection. Sent on idle connection by some servers.
Conflict
The request conflicts with the current state of the server.
Gone
The requested content has been permanently deleted from server, with no forwarding address.
Length Required
The server rejected the request because the Content-Length header field is not defined.
Precondition Failed
The client indicated preconditions in its headers which the server does not meet.
Payload Too Large
Request entity is larger than limits defined by server.
URI Too Long
The URI requested by the client is longer than the server is willing to interpret.
Unsupported Media Type
The media format of the requested data is not supported by the server.
Range Not Satisfiable
The range specified by the Range header field in the request cannot be fulfilled.
Expectation Failed
The expectation indicated by the Expect request header field cannot be met by the server.
I'm a Teapot
The server refuses to brew coffee because it is a teapot. (April Fools joke RFC 2324)
Misdirected Request
The request was directed at a server that is not able to produce a response.
Unprocessable Entity
The request was well-formed but unable to be followed due to semantic errors.
Locked
The resource being accessed is locked.
Failed Dependency
The request failed because it depended on another request that failed.
Too Early
The server is unwilling to risk processing a request that might be replayed.
Upgrade Required
The server refuses to perform the request using the current protocol.
Precondition Required
The origin server requires the request to be conditional.
Too Many Requests
The user has sent too many requests in a given amount of time (rate limiting).
Request Header Fields Too Large
The server is unwilling to process the request because its header fields are too large.
Unavailable For Legal Reasons
The user requested a resource that cannot legally be provided.
5xx Server Error (11)
Internal Server Error
The server has encountered a situation it does not know how to handle.
Not Implemented
The request method is not supported by the server and cannot be handled.
Bad Gateway
The server, while working as a gateway, got an invalid response from the upstream server.
Service Unavailable
The server is not ready to handle the request. Common causes are maintenance or overloading.
Gateway Timeout
The server is acting as a gateway and cannot get a response in time.
HTTP Version Not Supported
The HTTP version used in the request is not supported by the server.
Variant Also Negotiates
The server has an internal configuration error.
Insufficient Storage
The server is unable to store the representation needed to complete the request.
Loop Detected
The server detected an infinite loop while processing the request.
Not Extended
Further extensions to the request are required for the server to fulfill it.
Network Authentication Required
The client needs to authenticate to gain network access.
Quick Reference
- 1xx - Informational responses
- 2xx - Successful responses
- 3xx - Redirection messages
- 4xx - Client error responses
- 5xx - Server error responses
Common Codes
- 200 - OK (Success)
- 301 - Permanent Redirect
- 400 - Bad Request
- 404 - Not Found
- 500 - Internal Server Error
API Best Practices
- Use 201 for resource creation
- Use 204 for successful deletion
- Use 400 for validation errors
- Use 401 vs 403 correctly
- Use 429 for rate limiting