What 202 means
The server has accepted the request but hasn’t acted on it yet, and it might still fail later. HTTP has no way to send the final result on the same request, so the response should say where to check.
When servers send it
For slow or queued work: video encoding, bulk imports, sending a batch of emails, generating a report.
Why you might see it
- A job that was queued rather than done straight away.
Using it as a developer
- Return a link the client can poll for progress, for example in a
Locationheader or the body. - Give the job an id, so retries don’t create duplicates.
- When the job finishes, the status URL can redirect to the result (303 See Other) or show it.
If you’re visiting a website
- Nothing. Your request is in the queue.
Related codes
- 201 Created: The request worked and created something new, usually found at the URL in the Location header.
- 200 OK: The request worked and the response contains the result.
- 303 See Other: Go and GET the URL in the Location header, typically after submitting a form.
- 204 No Content: The request worked and there is nothing to send back.
Where it’s defined
202 Accepted is defined in RFC 9110, section 15.3.3. It’s a 2xx code, the success class: the request worked.
Other 2xx codes
200 OK · 201 Created · 204 No Content · 206 Partial Content
Or search them all in the HTTP status code list.