The request was accepted but has not been carried out yet. The work happens asynchronously, and the response tells you where to look for the result.
Defined in RFC 9110 §15.3.3 — 202 Accepted · MDN reference
Report generation, video transcoding, bulk imports, index rebuilds and payment captures that clear asynchronously — anywhere the real work outlives the request that asked for it and the server refuses to hold the connection open.
The status your client is most likely to mishandle: it is a success, but the thing you asked for has not happened. Poll the status URL until it resolves instead of assuming completion.
Treat it as "not yet", never as "done". Take the Location or the job id, poll with backoff, and give the poll a deadline. The most expensive bug in this shape is a test suite that asserts 202 and then asserts on data the job had not written yet — it passes locally and fails in CI, intermittently, forever.
6 endpoints in this playground answer with 202. Every one is free, needs no signup, and can be called from the browser or with curl.
POST https://funapi.dev/api/protocol/v1/jobs — Start an async job — 202 Accepted (Protocol Lab API) Open & run this endpointPOST https://funapi.dev/api/fiba/v1/games/{id}/highlights — Queue a highlight reel — 202 Accepted, then poll the job (FIBA World Cup API) Open & run this endpointPOST https://funapi.dev/api/streams/v1/events — Publish a custom event (Event Streams API) Open & run this endpointGET https://funapi.dev/api/faults/v1/status/{code} — Return any status code on demand (200–599) (Fault Injection API) Open & run this endpointPOST https://funapi.dev/api/data/v1/jobs — Queue a large fixture job (Fun Data Bridge API) Open & run this endpointPOST https://funapi.dev/api/mcp/v1/mcp — Streamable HTTP endpoint (JSON responses): initialize, tools, resources, prompts, ping (MCP Test Server) Open & run this endpointAll HTTP status codes · All 55 mock REST APIs · Getting started guide
Last updated