When you see this status
- Long-running async job (e.g., report generation) accepted
- Background processing task initiated successfully
- Request queued for deferred execution
Common causes
- Server accepted request for async processing
- Request requires significant backend computation
- Client requested non-blocking operation
How to debug it
- Check server logs for async job status
- Verify job completion via provided URI
- Ensure client handles Location header
Return this code in your framework
Express (Node.js)
res.status(202).location('/jobs/123').send('Accepted')
FastAPI (Python)
return JSONResponse(status_code=202, headers={"Location": "/jobs/123"}, content={"status": "accepted"})
NestJS
@Post() @HttpCode(202) @Header('Location', '/jobs/123') async createJob() { return { status: 'accepted' }; }
Go (net/http)
w.WriteHeader(http.StatusAccepted); w.Header().Set("Location", "/jobs/123")
About HTTP 202
HTTP status code 202 Accepted is part of the
2xx Success family. Request accepted for processing but not yet completed. Understanding it is essential for
backend engineers, API designers, and anyone debugging integrations between services.
The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance:
what triggers them, how to debug them in production, and exactly how to return them from common
frameworks. Each code page is hand-curated and verified.