What 201 means
The usual answer to a successful POST or PUT that made something new. The response should include a Location header pointing at the new resource and may include its representation.
Clients often rely on 201 specifically to know that a follow-up GET will work, so returning 200 for creation breaks that expectation.
Common causes
- A resource was created by the request.
How to fix it
- Return Location with the new URL and keep the response body consistent with a later GET.
What it looks like
A typical response:
HTTP/1.1 201 Created
Location: /api/orders/8f3a
Content-Type: application/json
{"id":"8f3a","status":"pending"}
The same event in an nginx access log (the status is the number after the request line):
203.0.113.7 - - [10/Sep/2026:10:12:01 +0000] "POST /api/orders HTTP/1.1" 201 153 "-" "Mozilla/5.0"
Check it with curl
-i prints the status line and headers, and -w '%{http_code}' prints only the number, which is handy in scripts and health checks. Replace the URL with yours:
curl -sS -o /dev/null -w '%{http_code} %{time_total}s\n' https://example.com/api/orders
Compare what curl sees with what the browser sees. A different status from the same URL usually means a cache, a CDN edge or a cookie is in the way.
Investigating a run of 201s? Paste the log excerpt into Log Share to get line numbers, highlighting and an expiring link for whoever is on call with you.
Related status codes
200OK: The request succeeded and the response carries the result.202Accepted: The request was accepted for processing, but processing has not finished.409Conflict: The request conflicts with the current state of the resource.
FAQ
Does PUT return 201 or 200?
201 if PUT created the resource at that URL, 200 or 204 if it replaced an existing one.