DevToolsmith

HTTP 200 OK

HTTP 200 OK means the request succeeded and the response contains the result. The request was received, understood and accepted.

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

What HTTP 200 means

The standard success response. For GET it carries the requested resource, for POST the result of the action. 200 is the right default, but more specific codes help clients: 201 when something was created, 204 when there is no body, and 206 for partial content.

Using 200 correctly

  • Don’t return 200 with {"error": "..."} in the body. Monitoring, caches, retries and client libraries all rely on the status code to detect failures.
  • A 200 response to GET is cacheable by default unless headers like Cache-Control say otherwise.

Retrying

Not applicable: this isn’t an error.

Example response

HTTP/1.1 200 OK
Date: Wed, 21 Oct 2026 10:30:00 GMT
Content-Type: application/json

How to return 200

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

Related status codes

Other 2xx status codes

201 Created · 202 Accepted · 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 200 OK mean?

HTTP 200 OK means the request succeeded and the response contains the result. The standard success response. For GET it carries the requested resource, for POST the result of the action. 200 is the right default, but more specific codes help clients: 201 when something was created, 204 when there is no body, and 206 for partial content.