Success · 2xx

202 Accepted

The request has been accepted for processing but has not yet completed.

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"}

Related status codes

Frequently Asked Questions

How does the client know when the job is done?
Two options: poll the URL given in Location until it returns a final status, or accept a webhook callback URL on the original request and have the server POST to it on completion.
Is 202 the same as 201?
No. 201 means the resource was created synchronously and is ready now. 202 means the work is still in progress.
Should 202 include progress data?
Often yes. Include a percentage, ETA, or status field so clients can show useful progress UI without polling more than necessary.
Defined in: RFC 9110 · Class: 2xx Success

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.