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.
4 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 — Accepted. Poll the Location header until status is "done". (Protocol Lab API) Open & run this endpointPOST https://funapi.dev/api/fiba/v1/games/{id}/highlights — Render job accepted (FIBA World Cup API) Open & run this endpointPOST https://funapi.dev/api/streams/v1/events — Event accepted (Event Streams API) Open & run this endpointPOST https://funapi.dev/api/data/v1/jobs — Job accepted (Fun Data Bridge API) Open & run this endpointAll HTTP status codes · All 39 mock REST APIs · Getting started guide
Last updated