HTTP 201 Created
The request succeeded and created a resource. The Location header normally points to it.
Good to know
- Return it after a successful POST that creates something.
Example response
HTTP
HTTP/1.1 201 Created
Location: /items/42
Content-Type: application/json; charset=utf-8
{ "ok": true }Look up the headers shown here in the HTTP headers reference.
Common questions
- What does HTTP 201 mean?
- Created. The request succeeded and created a resource. The Location header normally points to it.
- When should I use 201?
- Return it after a successful POST that creates something.
- Is 201 an error?
- No. 2xx codes are success responses: The request was received, understood and accepted.