2xx Success

HTTP 201 Created

The request succeeded and a new resource was created, usually returned with a Location header.

201 Created means the request succeeded and created a new resource. The response should carry a Location header with the new resource's URL, and often its representation in the body.

HTTP/1.1 201 Created

When servers send it

  • A POST to a collection, such as POST /users, created an item.
  • A PUT created a resource at a URL that did not exist before.

How to handle it

  • Read the Location header to find the new resource.
  • Servers that create resources asynchronously should answer 202 Accepted instead.

Related status codes

Other status codes

1xx Informational

2xx Success

3xx Redirection

5xx Server error

Search all HTTP status codes