Skip to content
202

Accepted

Success (2xx)

The 202 Accepted status code indicates that the request has been accepted for processing, but the processing has not been completed. The request may or may not be eventually acted upon. This is useful for asynchronous operations where the server queues the request for later processing, such as batch jobs, email sending, or background tasks.

What is HTTP 202 Accepted?

HTTP 202 Accepted is a success (2xx) status code. The 202 Accepted status code indicates that the request has been accepted for processing, but the processing has not been completed. The request may or may not be eventually acted upon. This is useful for asynchronous operations where the server queues the request for later processing, such as batch jobs, email sending, or background tasks. Common causes include asynchronous task queued for processing and batch job submitted. This response indicates the server processed the request as expected.

Example Response

HTTP/1.1 202 Accepted
Content-Type: application/json

{"taskId": "abc-123", "status": "queued", "statusUrl": "/api/tasks/abc-123"}

Common Causes

What to Know

  1. 1. 202 is a success status — no fix needed
  2. 2. Check for a status URL in the response to poll for completion
  3. 3. If processing never completes, investigate your background job system

Frequently Asked Questions

How does the client know when processing is complete?

The server typically returns a status URL or task ID that the client can poll. Some APIs use webhooks to notify the client when processing finishes. The response body should indicate how to check status.

Does 202 guarantee the request will be processed?

No. The 202 status only means the request was accepted, not that it will succeed. The actual processing may still fail. The client should check the task status to confirm completion.

When should I use 202 instead of 200?

Use 202 when the server cannot complete the request immediately and will process it asynchronously. If the operation completes within the request-response cycle, use 200 or 201 instead.

Related Status Codes

200 OK 201 Created 204 No Content

Related Reading

HTTP Status Codes Cheat Sheet: Every Code Explained → JSON vs YAML vs TOML: Which Config Format to Use →