success RFC 9110
HTTP 201 Created
Request succeeded and a new resource was created as a result.
What it means
The server created a new resource in response to the request (typically POST or PUT). The response should include a `Location` header pointing at the URL of the new resource, and the body typically contains a representation of it. This is the RESTful convention — using 200 for creation works but 201 is more precise.
When servers send it
- •POST to a collection endpoint that creates a new resource (POST /users → new user)
- •PUT to a specific URL that did not previously exist (PUT /users/42 where 42 was unused)
What the client does
Reads the `Location` header to know the URL of the new resource. Reads the body for the created representation.
Example response
HTTP/1.1 201 Created
Location: /api/users/42
Content-Type: application/json
{"id": 42, "email": "[email protected]"} When you see it
- •Successful creation — no action needed
Similar codes
200 OK success
The request succeeded and the response body contains the requested data.
202 Accepted success
Request was accepted for processing but not yet completed.
204 No Content success
Request succeeded but there is no body in the response.
206 Partial Content success
Server is returning part of a resource due to a Range header from the client.
← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference