200 OK

Success - The request succeeded

HTTP 200 OK

What It Means

The HTTP 200 OK status code indicates that the request has succeeded. The meaning of "success" depends on the HTTP method:

  • GET: The resource was fetched and transmitted in the message body
  • POST: The resource describing the result of the action is transmitted in the message body
  • PUT/PATCH: The resource was successfully updated

When to Use 200

Use 200 OK when:

  • Returning data from a GET request
  • A POST/PUT/PATCH successfully modified a resource and you're returning the updated data
  • A search query returns results (even if empty)

200 vs Other Success Codes

Code When to Use
200 Request succeeded, returning data
201 Resource created (POST)
204 Success, no content to return (DELETE)

Example Response

HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: max-age=3600

{
  "id": 123,
  "name": "Example Resource",
  "status": "active"
}

Best Practices

  • Always include a response body for GET requests
  • Set appropriate Cache-Control headers for cacheable responses
  • Use 201 instead of 200 when creating new resources
  • Use 204 instead of 200 when there's no content to return

Frequently Asked Questions

What does HTTP 200 OK mean?
HTTP 200 OK is the standard response for a successful HTTP request. The meaning varies by method: for GET requests, the resource is returned in the response body; for POST requests, the response contains the result of the action.
Should I always return 200 for success?
No. Use 201 Created when a new resource is created via POST, 204 No Content when the operation succeeds but there is nothing to return (like DELETE), and 202 Accepted for asynchronous operations. Using the right status code makes your API more RESTful and easier to consume.
Can a 200 response indicate a problem?
Yes. A 200 response only means the HTTP transaction succeeded. Your API might return 200 with an error in the JSON body, which is considered bad practice. Always use appropriate 4xx/5xx status codes for errors so monitoring tools and clients can detect failures.
How do I monitor for 200 responses?
UptimeSignal checks your endpoints and verifies they return the expected status code (typically 200). If your endpoint starts returning errors like 500 or 503, you get alerted immediately. You can also configure expected response body keywords for deeper validation.
What is the difference between 200 and 204?
Both indicate success, but 200 OK includes a response body while 204 No Content does not. Use 204 for operations like DELETE where there is no meaningful data to return, and 200 when you need to send data back to the client.

Verify your endpoints return 200

UptimeSignal verifies your endpoints return the correct status codes.

Start monitoring free →

Related Status Codes

More Resources