HTTP 201 Created
The request was successful and a new resource was created as a result.
Created
The request was successful and a new resource was created as a result.
What Causes HTTP 201?
- POST request created a new resource successfully
- PUT request created a new resource at the specified URI
- New user account, order, or record was created
Code Examples
See how HTTP 201 responses look in different programming languages and tools.
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-d '{"name":"John"}'
# Response: 201 CreatedHow to Fix HTTP 201
- Extract the resource ID from the Location header
- Use the returned resource ID for subsequent operations
- Verify the resource was created by fetching it with GET
Related Status Codes
The request was successful. The response body contains the requested resource.
The request succeeded but returns no content in the response body.
The request was malformed or invalid. The server cannot process it.
The server encountered an unexpected condition that prevented it from fulfilling the request.
Test Your APIs
Frequently Asked Questions
What does HTTP 201 mean?
The request was successful and a new resource was created as a result.
What causes HTTP 201?
POST request created a new resource successfully. PUT request created a new resource at the specified URI. New user account, order, or record was created
How to fix HTTP 201?
Extract the resource ID from the Location header. Use the returned resource ID for subsequent operations. Verify the resource was created by fetching it with GET