DevToolsmith

HTTP 202 Accepted

HTTP 202 Accepted means the request was accepted for processing, but the work isn’t finished yet. The request was received, understood and accepted.

Class
2xx Success
Standard
RFC 9110
Cacheable by default
No
Safe to retry
Not applicable: this isn’t an error
Go constant
http.StatusAccepted

What HTTP 202 means

Use 202 for asynchronous work: video transcoding, report generation, bulk imports. The server promises nothing about the outcome, so include a way to check progress, typically a Location header or a status URL in the body that the client can poll.

Using 202 correctly

  • A common pattern: POST /exports returns 202 with /exports/123; GET /exports/123 returns the status, then a link to the file when done.

Retrying

Not applicable: this isn’t an error.

Example response

HTTP/1.1 202 Accepted
Date: Wed, 21 Oct 2026 10:30:00 GMT
Location: /jobs/7f3a
Content-Type: application/json

How to return 202

Node.js (Express)
res.status(202).json(result);
Python (FastAPI)
@app.post("/items", status_code=202)
def create_item(item: Item):
    return item
Go (net/http)
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusAccepted)
json.NewEncoder(w).Encode(result)

Related status codes

  • 201 Created : The request succeeded and a new resource was created.
  • 200 OK : The request succeeded and the response contains the result.
  • 303 See Other : Redirects the client to another URL, which it should fetch with GET.

Other 2xx status codes

200 OK · 201 Created · 203 Non-Authoritative Information · 204 No Content · 205 Reset Content · 206 Partial Content · 207 Multi-Status

See the full list of HTTP status codes.

Sources

Spotted a mistake? Email hello@devtoolsmith.com and we’ll fix it.

Frequently asked questions

What does HTTP 202 Accepted mean?

HTTP 202 Accepted means the request was accepted for processing, but the work isn’t finished yet. Use 202 for asynchronous work: video transcoding, report generation, bulk imports. The server promises nothing about the outcome, so include a way to check progress, typically a Location header or a status URL in the body that the client can poll.