2xx Success

HTTP 202 Accepted

The request has been accepted for processing, but the processing has not been completed.

When is 202 used?

  • Asynchronous job submissions
  • Queue-based processing (email sending, image processing)

How to handle a 202 response

No error handling is needed. Check that the response body and headers match what your client expects — for example, a 204 response has no body.

Check the status code a URL returns from the command line:

curl -s -o /dev/null -w "%{http_code}\n" https://example.com

How to return 202 from your server

Node.js (Express)

res.status(202).json({ message: 'Accepted' });

Python (Flask)

return {"message": "Accepted"}, 202

Go (net/http)

w.WriteHeader(202)

Frequently Asked Questions

What does HTTP 202 mean?

202 Accepted: The request has been accepted for processing, but the processing has not been completed.

Is 202 an error?

No. 202 is in the 2xx Success class. Success: the request was received, understood, and accepted.