Skip to content
200

OK

Success (2xx)

The 200 OK status code indicates that the request has succeeded. The meaning of success depends on the HTTP method: GET returns the requested resource, POST indicates successful processing and may return a created resource, PUT/PATCH indicates the resource was updated, and DELETE confirms removal. This is the most common HTTP response code.

What is HTTP 200 OK?

HTTP 200 OK is a success (2xx) status code. The 200 OK status code indicates that the request has succeeded. The meaning of success depends on the HTTP method: GET returns the requested resource, POST indicates successful processing and may return a created resource, PUT/PATCH indicates the resource was updated, and DELETE confirms removal. This is the most common HTTP response code. Common causes include successful get request returning data and successful form submission. This response indicates the server processed the request as expected.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json

{"status": "success", "data": {...}}

Common Causes

What to Know

  1. 1. 200 is a success status — no fix needed
  2. 2. If you expected a different status, verify your API endpoint's response logic
  3. 3. Some APIs return 200 with error details in the body — check the response body

Frequently Asked Questions

Should a POST request return 200 or 201?

If the POST creates a new resource, 201 Created is more appropriate. If it performs an action that does not create a resource (like sending an email or triggering a process), 200 OK is correct.

Can a 200 response contain an error?

Technically yes, some APIs return 200 with error details in the body. This is considered an anti-pattern. Properly designed APIs use appropriate 4xx/5xx status codes for errors.

What is the difference between 200 and 204?

200 OK includes a response body. 204 No Content indicates success but intentionally returns no body. Use 204 for operations like DELETE where there is nothing to return.

Related Status Codes

201 Created 204 No Content 304 Not Modified

Related Reading

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