202 Accepted HTTP Status Code

Description

HTTP status code 202 is defined as "Accepted." This status code indicates that the request has been received but not yet acted upon. It is non-committal, meaning that there is no guarantee that the action will be carried out since it might be disallowed when processing actually takes place. Essentially, the 202 status code is used to acknowledge that the server has accepted the client's request for processing, but the processing has not been completed.

The 202 status is typically used for asynchronous processing of requests. For example, if a server takes significant time to process an action but doesn't want to keep the client waiting, it might send a 202 response to acknowledge receipt of the request and then process the action in the background. The response can include an indication of the request's current status and a way to check the progress of the processing in the response body or headers.

Status

HTTP
202 Accepted

Common Causes

There could be several reasons why a server would return a 202 status code:

  1. Asynchronous Processing: The server might be processing the request asynchronously, meaning it needs more time to complete the task. This is common in scenarios where the processing takes a significant amount of time, such as batch processing or long-running tasks.

  2. Queueing: The request may have been queued for processing due to high server load or resource constraints. The server prioritizes requests and processes them in order.

  3. Delayed Processing: The server might be designed to delay processing for some reason, such as waiting for additional data or resources to become available.

  4. Intermediate Processing Step: The request may have been accepted, but it requires further processing steps before it can be fully completed.

  5. Asynchronous API: In some cases, APIs may accept a request and return a 202 status code immediately, indicating that the request has been accepted and will be processed in the background. This is often seen in APIs that perform tasks like data import/export or lengthy computations.

  6. Partial Success: In some cases, the request might result in partial success, where some parts of the request were accepted and processed successfully, while others were not. The 202 status code can be used to indicate this partial success.

In summary, the 202 status code indicates that the request has been accepted for processing, but the client should not expect an immediate response. It's up to the client to determine how to handle this situation, whether it's polling the server for updates, waiting for a callback, or taking some other action.

Browser Support

The following table will show you the current browser support for the 202 Accepted HTTP status code.

Desktop
Edge Chrome Firefox Opera Safari
YesYesYesYesYes
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
YesYesYesYesYesYes

Last updated by CSSPortal on: 31st March 2024