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 | The request succeeded. What the response body contains depends on the request method. |
| 201 | Created | The request succeeded and created one or more new resources. The Location header identifies the primary new resource. |
| 202 | Accepted | The server accepted the request for processing but has not finished it. The work may still fail or be rejected later. |
| 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 request succeeded and the response intentionally has no body. |
| 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. |