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

← All HTTP status codes · HTTP status cheat sheet · HTTP headers reference