HTTP status codes

1xx (Informational)

101 Switching Protocols

Indicates a protocol to which the server switches. The protocol is specified in the Upgrade request header

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade

2xx (Success)

200 OK

The request is successful Can contain response body

201 Created

The request has succeeded and has led to the creation of a resource It is commonly used in the POST response if resource is created

202 Accepted

The request has been accepted for processing, but the processing has not been completed It is commonly used for asynchronous APIs.

204 No Content

The request is successful.Typically used in POST, PUT, PATCH, DELETE No response body

3xx (Redirection)

301 Moved Permanently

  • Client should not attempt again the same URL
  • See Location Header for new URL

302 Found (Moved Temporarily)

  • See Location Header for new URL

4xx (Client errors)

400 Bad Request

The server cannot or will not process the request due to something that is perceived to be a client error

401 UNAUTHORIZED

It is actually used for Unauthenticated

403 FORBIDDEN

It is actually used for Unauthorized

404 Not Found

Resource not found

429 Too Many Requests

Used in Rate limiter

5xx (Server errors)

500 Internal Server Error

Indicates server error

503 Service Unavailable

The server is not ready to handle the request It is commonly used when server is down for maintenance or it is overloaded