Skip to content

202 Accepted (HTTP Status Code 202)

Updated: at 09:12 AM

HTTP status code 202 “Accepted” indicates that the server has received the request and is processing it, but has not yet completed the operation. This status code informs the client that the request has been accepted, but the outcome is not yet known, or it may take a long time to complete. This differs from status code 200, which indicates that the request has been successfully completed.

The 202 status code is typically used for asynchronous operations, where the server has begun processing the request but does not want the client to wait. Instead, it allows the client to continue with other tasks. In this case, the server returns a 202 status code and may inform the client of the processing result at a later time through other means (such as notifications or polling).

Common Scenarios for 202 Responses:

Example of a 202 Response:

HTTP/1.1 202 Accepted
Content-Type: text/plain
Content-Length: 15

Request accepted.

In this example, the server returns a brief message “Request accepted,” indicating that the request has been accepted, but processing is not yet complete. The response body may contain additional information, but this is generally optional.

Sometimes, the server may also include a Retry-After header in the response, indicating how long the client should wait before checking the status of the request again, or when the processing may be completed.