Skip to the content.

HTTP Status Codes

Status Code Description Purpose When to use (Stage of Request Processing)
200 OK The request has succeeded. The information returned with the response depends on the method used in the request. General success status code. After successful processing of request.
201 Created The request has been fulfilled and resulted in a new resource being created. Successful creation of a new resource following a POST request. After successful POST Request
202 Accepted The request has been accepted for processing, but the processing has not been completed. Asynchronous processing or batch processing is happening in the server. Code for Async or Batch Request
204 No Content The server has successfully fulfilled the request and there is no additional content to send in the response. Successful request when there’s nothing to return (e.g., DELETE request). Usually used after DELETE Request
400 Bad Request The server could not understand the request due to invalid syntax. General error when the server can’t or won’t process the request. Early in processing, when the server recognizes malformed syntax.
401 Unauthorized The request lacks valid authentication credentials for the target resource. Authentication is required and has failed or not yet been provided. Authentication Failure
403 Forbidden The server understood the request, but it refuses to authorize it. The user doesn’t have the necessary permissions for a resource. Authorization Failure
404 Not Found The server can’t find the requested resource. The server can’t find the requested resource, a link is broken. Resource Not Found
405 Method Not Allowed The method specified in the request is not allowed for the resource identified by the request URI. Wrong HTTP method used for a resource, e.g., GET on a form where POST is required. Early in processing, when an invalid HTTP method is used.
409 Conflict The request could not be completed due to a conflict with the current state of the target resource. Indicates that the request could not be processed because of a conflict. During processing, when a conflict in resource state is detected.
422 Unprocessable Entity The server understands the content type of the request entity, and the syntax of the request entity is correct, but it was unable to process the contained instructions. The client’s request was well-formed, but semantically incorrect. Validation Errors
500 Internal Server Error The server encountered an unexpected condition that prevented it from fulfilling the request. A generic error message when a server exception prevents the request. Error during Request Processing