2xx HTTP Status Codes
2xx status codes are successful responses.
This is an educational guide. The pages linked here are documentation pages served as 200 OK, even when the HTTP status code being explained is an error response.
What 2xx means
Successful responses mean the server accepted the request and completed, accepted, or partially completed the requested action. The exact meaning depends on the method and status code.
Where 2xx responses appear
- A GET request returns a representation of the resource.
- A POST request creates or accepts a new operation.
- A DELETE or PUT request succeeds without needing to return a body.
- A range request returns only part of a larger representation.
Implementation notes
- Use the most specific 2xx response instead of always returning 200 OK.
- Return 201 Created when a new resource is created and include its URL when possible.
- Return 204 No Content when the request succeeded and an empty body is intentional.
All 2xx status codes
| Code | Name | Meaning |
|---|---|---|
| 200 | OK | Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request, the response will contain an entity describing or containing the result of the action. |
| 201 | Created | The request has been fulfilled, resulting in the creation of a new resource. |
| 202 | Accepted | The request has been accepted for processing, but the processing has not been completed. The request might or might not be eventually acted upon, and may be disallowed when processing occurs. |
| 203 | Non-Authoritative Information | The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response. |
| 204 | No Content | The server successfully processed the request, and is not returning any content. |
| 205 | Reset Content | The server successfully processed the request, asks that the requester reset its document view, and is not returning any content. |
| 206 | Partial Content | The server is delivering only part of the resource (byte serving) due to a range header sent by the client. The range header is used by HTTP clients to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams. |
| 207 | Multi-Status | The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made. |
| 208 | Already Reported | The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again. |
| 226 | IM Used | The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. |