What 202 Accepted means

202 Accepted is the async-job status code. The server has validated the request and queued it, but the work is not yet done. The response should include a way to check progress, typically a status URL in the Location header or a job ID in the body. 202 is appropriate for long-running operations like video transcoding, batch imports, or any work that exceeds reasonable HTTP response time.

When servers should return it: Servers return 202 when they will perform the work asynchronously. Always give the client a way to poll for completion or subscribe to a webhook.

Example response

curl -i -X POST https://api.example.com/exports

HTTP/2 202
location: /jobs/abc123
content-type: application/json
{"job_id":"abc123","status":"queued","poll_url":"/jobs/abc123"}

More references

For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.