HTTP 201 — Created
2xx Success
What it means
The request succeeded and a new resource was created, usually by a POST or PUT.
What to do about it
Include a Location header pointing at the new resource. Many APIs return 200 where 201 would be more accurate.
Where it sits
201 belongs to the 2xx family: The request was received, understood and accepted.
HTTP/1.1 201 Created
Checking it yourself
# see the status code and headers only
curl -sI https://example.com/path
# follow redirects and print each hop
curl -sIL -o /dev/null -w "%{http_code} %{url_effective}\n" https://example.com/path
# JavaScript
const r = await fetch(url);
console.log(r.status, r.statusText);
How this code behaves
| Cacheable by default | No — caches must not store this response unless explicit cache headers permit it. |
| Safe to retry | Not applicable. |
| Effect on search indexing | No direct effect. |
Returning 201 correctly
# nginx
return 201;
# Express
res.status(201).json({ error: 'Created' });
# Go
w.WriteHeader(201)
# Python (Flask)
return jsonify(error='Created'), 201;
Frequently asked questions
What does HTTP 201 mean?
The request succeeded and a new resource was created, usually by a POST or PUT.
How do I fix a 201 error?
Include a Location header pointing at the new resource. Many APIs return 200 where 201 would be more accurate.
Is 201 a client or server problem?
Neither — it indicates success or progress.