HTTP 201 Created — What It Means
What HTTP status code 201 Created means, when servers return it, and how to handle it correctly.
Published September 22, 2026
HTTP 201 Created means the request succeeded and a new resource was created as a result. The response should include a Location header pointing to the new resource.
What it means
It is the correct success code for POST (and sometimes PUT) that creates something, such as a new user or order.
Common causes: POST /users creating a user; PUT creating a resource at a new URL; API create endpoints.
On the wire
POST /users HTTP/1.1
HTTP/1.1 201 Created
Location: /users/8
Content-Type: application/json
Practical examples
Test it from the shell
curl -i https://example.com/path # look for HTTP 201Handling 201 in code or config
res.status(201).location(`/users/${u.id}`).json(u)How to fix it
Include a Location header; Return the created representation in the body; Use 200 only when nothing was created.
1. Reproduce: curl -i <url>
2. Confirm the status is 201
3. Apply the fix above and re-testCommon mistakes
- Treating this as an error when it is a normal part of HTTP.
- Return the created representation in the body
- Ignoring the response headers that explain the details.
Key takeaways
- 201 means Created.
- HTTP 201 Created means the request succeeded and a new resource was created as a result.
- Read the response headers and logs for the exact cause.
FAQ
What goes in the Location header?
The URL of the newly created resource.
Is 201 a client or server error?
It is a success status code, in the 2xx class.