202Status code
2xxSuccess
NoCacheable by default
RFC 9110 §15.3.3Defined in
Common causes
- Job queued for background processing
- Batch import or video encode that runs asynchronously
What to do
Give the client a status URL it can poll, since 202 says nothing about the final outcome.
Example response
HTTP/1.1 202 Accepted
Content-Type: application/json
{"ok":true}
Returning 202 in code
Express res.status(202).json({ … });
Flask return jsonify(…), 202
PHP http_response_code(202);
Go w.WriteHeader(202)