202 Accepted means the request has been accepted for processing but is not yet complete. The server uses it when it queues the request or hands it to an asynchronous worker and wants to respond immediately without waiting for the outcome.
Because success is not yet determined at response time, the server usually provides a status/job URL (via Location or the body) that the client can poll.
POST /api/reports HTTP/1.1
Host: api.example.com
Content-Type: application/json
{"type":"monthly","month":"2026-07"}HTTP/1.1 202 Accepted
Location: /api/jobs/8f2a
Content-Type: application/json
{"jobId":"8f2a","status":"queued"}app.post('/api/reports', (req, res) => {
const jobId = queue.enqueue(req.body);
res.status(202).location(`/api/jobs/${jobId}`).json({ jobId, status: 'queued' });
});@app.post('/api/reports')
def report():
job = queue.enqueue(build_report, request.json)
return {'jobId': job.id, 'status': 'queued'}, 202