ApiSimul logo ApiSimul — the switchboard

HTTP 202 — Accepted

HTTP 202 acknowledges that the request landed and will be handled later — the processing has been queued but is not finished when the response is sent. It is the signature of asynchronous work.

When 202 shows up

Mocking a 202 response

A response with this status can be faked end to end with a local mock rule — no backend changes needed. The configuration below mirrors the rule fields the ApiSimul editor uses (method, path, status, delay in milliseconds, response body):

{
  "method": "GET",
  "path": "/api/jobs",
  "status": 202,
  "delay": 300,
  "enabled": true,
  "body": {
    "jobId": "{{string.uuid}}",
    "state": "queued",
    "eta": "{{date.iso}}"
  }
}

Dynamic placeholders such as {{random.name}}, {{string.uuid}} or {{number.int 1 100}} can appear inside the body to vary each response, which keeps client-side list rendering and retry logic honest during development.

Frequently asked questions

What does HTTP 202 mean?
The request was accepted for processing but the outcome is not available yet. Clients poll a status endpoint or wait for a callback.

How can I test a 202 response without a real backend?
Define a mock rule with the method and path your client requests and set the status to 202. The example configuration above returns this response after the listed delay, so the client exercises its 202 handling exactly as it would against a live server.

Related status codes

Need the response in your own project? Spin up rules for any status with the ApiSimul mock server, or browse every status code page.