Skip to main content
apiguide.dev

HTTP 200 — OK

The request has succeeded. The response payload contains the requested resource representation.

Status CodeHTTP 200
CategorySuccess (2xx)
API Error Subtypes0 error schemas
HTTP Headers14 headers

What does HTTP status code 200 mean?

The 200 OK status code is the generic success response indicating that the request was processed successfully and the result is returned in the response body.

When to use it in APIs

Use 200 for successful GET requests returning data, successful PUT or PATCH updates that return the modified resource, and successful POST operations that do not result in resource creation.

How it compares to other codes

  • 201 Created: Use 201 when a new resource was created, reserving 200 for read, update, or non-creational actions.
  • 204 No Content: Use 204 when a delete or update succeeded but returns no response payload.

Specific API Error Types for 200

No specific Problem+JSON schemas have been defined for HTTP 200 on apiguide.dev yet.

Associated HTTP Headers

Access-Control-Allow-Origin

Specifies which origin(s) are permitted to read the response in a CORS request.

View reference →

Access-Control-Expose-Headers

Lists the response headers that browsers are allowed to expose to client-side JavaScript.

View reference →

Age

The time in seconds since a cached response was generated at the origin server.

View reference →

Cache-Control

Directives for caching mechanisms in both requests and responses.

View reference →

Content-Disposition

Indicates whether the body should be displayed inline or treated as a downloadable attachment.

View reference →

Content-Encoding

Indicates the compression encoding that has been applied to the message body.

View reference →

Content-Language

Describes the natural language(s) of the intended audience for the message body.

View reference →

ETag

An identifier for a specific version of a resource, used for cache validation.

View reference →

Expires

The absolute date and time after which a cached response is considered stale.

View reference →

Last-Modified

The date and time a resource was last changed, used for cache validation.

View reference →

Link

Provides a means to serialize relationships between resources in HTTP headers, commonly used for pagination.

View reference →

Prefer

Lets the client request optional, non-critical handling behaviors from the server.

View reference →

Range

Requests only part of a resource by specifying one or more byte ranges.

View reference →

Vary

Lists the request headers a response depends on, controlling cache key selection.

View reference →

Related HTTP Status Codes