--- title: "201 Created — what it means and how to fix it" description: "The request succeeded and a new resource was created as a result. What causes an HTTP 201, what to try as a visitor, and what to check if it is your own site." url: https://atoneplace.net/error/201/ site: "At One Place" --- # HTTP 201 — Created **HTTP 201: Created** The request succeeded and a new resource was created as a result. ## What 201 actually means The correct answer to a POST or PUT that brought something new into existence — a new user, a new order, a new file. The response should carry a `Location` header pointing at the thing that was created, and usually a body describing it. Using 200 here instead is common and harmless in practice, but 201 tells the client something useful that 200 does not. ## Common causes - A POST to a collection endpoint created a new record - A PUT to a URL that did not previously exist created the resource there ## If you're just trying to view the page 1. Nothing — whatever you submitted was saved 2. If the page did not update to show the new item, that is a front-end bug; reload to see it ## If it's your site 1. Include a `Location` header with the URL of the new resource; clients and API tooling rely on it 2. If creation is asynchronous and the resource does not exist yet, return 202 instead — 201 promises the thing is there now 3. Make creation idempotent where you can, so a retried request does not create duplicates ## Reference - **Status code:** 201 - **Reason phrase:** Created - **Category:** 2xx — Success - **Defined in:** RFC 9110 §15.3.2 ## Common questions ### What does HTTP 201 mean? The request succeeded and a new resource was created as a result. The correct answer to a POST or PUT that brought something new into existence — a new user, a new order, a new file. The response should carry a `Location` header pointing at the thing that was created, and usually a body describing it. ### How do I fix a 201 error? Nothing — whatever you submitted was saved ### Is 201 a client error or a server error? 201 is in the 2xx range, which means success. It is not an error at all. ## Related pages - [200 OK](https://atoneplace.net/error/200/) - [204 No Content](https://atoneplace.net/error/204/) - [206 Partial Content](https://atoneplace.net/error/206/) - [202 Accepted](https://atoneplace.net/error/202/) - [207 Multi-Status](https://atoneplace.net/error/207/) - [203 Non-Authoritative Information](https://atoneplace.net/error/203/) - [205 Reset Content](https://atoneplace.net/error/205/) - [208 Already Reported](https://atoneplace.net/error/208/) - [226 IM Used](https://atoneplace.net/error/226/) ## Sources - Hypertext Transfer Protocol (HTTP) Status Code Registry — IANA (https://www.iana.org/assignments/http-status-codes/) - RFC 9110: HTTP Semantics — IETF (https://www.rfc-editor.org/rfc/rfc9110.html)