HTTP Status Codes

202 Accepted

The request was accepted for processing, but the work is not finished. The standard status for asynchronous or queued operations.

What it means

202 Accepted decouples acceptance from completion: the server has queued the work but has not done it yet. The response should describe the current state and, ideally, give a status URL the client can poll.

HTTP RESPONSE
HTTP/1.1 202 Accepted
Content-Type: application/json
Location: /jobs/re-index/771

{ "job": "re-index", "state": "queued" }

Why it matters

  • It is the correct signal for long-running or background jobs, avoiding a hung connection while work completes.
  • A status/polling URL lets clients track progress without blocking.

Common mistakes

  • Using 202 but providing no way to check the eventual result.
  • Returning 202 for work that actually completed synchronously — use 200/201 then.

How WebInspect checks this

  • WebInspect reports the status and any Location header, letting you confirm an async endpoint returns a trackable 202.