HTTP Status Codes
HTTP Status Codes
HTTP status codes are standard codes the server returns to the client as part of the server response after handling the client’s HTTP request to indicate the request’s outcome.
The codes are divided into the following categories:
- 1xx: Informational
- 2xx: Success
- 3xx: Redirection
- 4xx: Client Error
- 5xx: Server Error
Code | Description |
---|---|
200 (OK) | General success status code. The request was successful. |
201 (Created) | The request has been fulfilled and resulted in the creation of a new resource. (Use POST or PUT; set Location header to the new resource.) |
204 (No Content) | The server processed the request successfully but returns no content (commonly used for DELETE or successful requests with empty response bodies). |
Code | Description |
---|---|
301 (Moved Permanently) | The requested resource has moved permanently to a new URL. Clients should update links/bookmarks. |
302 (Found / Moved Temporarily) | The requested resource resides temporarily under a different URL. Client may use the original URL for future requests. |
304 (Not Modified) | The resource has not been modified since the version specified by request headers — use cached copy (no body returned). |
Code | Description |
---|---|
400 (Bad Request) | The server cannot process the request because of client error (malformed syntax, validation failed, missing required data). |
401 (Unauthorized) | Authentication is required or the authentication token is missing/invalid. |
403 (Forbidden) | Server understood the request but refuses to authorize it (client lacks required permissions or ACL prevents access). |
404 (Not Found) | The requested resource could not be found at the provided URL. |
409 (Conflict) | Request could not be completed due to a conflict (e.g., duplicate entry or conflicting state such as deleting a root object without cascade support). |
Code | Description |
---|---|
500 (Internal Server Error) | Generic server error — an exception or unhandled condition occurred server-side. |
502 (Bad Gateway) | The server acting as a gateway or proxy received an invalid response from an upstream server. |
503 (Service Unavailable) | The server is temporarily unable to handle the request (overloaded, down for maintenance, or rate-limited). |