HTTP 201 Created

A rack server and a newly created archive folder with its identifier card

HTTP 201 Created means the server has created one or more resources while fulfilling the request. If the response includes Location, it identifies the primary resource created. Without that header, the request URI identifies that resource.

Find the new resource

For example, POST /tickets might respond with 201 and Location: /tickets/42. Resolve that relative location against the request URI, then use the API’s documented method to retrieve the ticket. Treat the location as a resource identifier for the successful write.

When a gateway generates the wrong address

If Location points at an internal host or uses an unexpected scheme, compare the response from the application with the response at the gateway. Check which public base URL the application uses and how the gateway forwards the host and scheme. Preserve the single successful creation while you inspect its response.

A short response that confirms creation

HTTP/1.1 201 Created
Location: /api/tickets/516
Content-Type: application/json

{"id":516,"state":"open"}

With an original request to https://example.com/api/tickets, the location above resolves to https://example.com/api/tickets/516. The response body describes what was created, and the location gives you the address to use for a later read. If the API offers asynchronous submission, a response of 202 Accepted gives a different clue. It tells you to look for a job status before assuming the work has finished.

Verify a successful write without sending it again

Save the returned location and resource ID along with the status. A later GET to that address can fail because of permissions, propagation delays or a routing mistake. Use the request ID to confirm whether the service created the resource before repeating the write. If the proxy route alone produces a bad address, compare the application’s Location with the one delivered to the client. The first place the address changes identifies which component to inspect.

RFC 9110.

All HTTP status codes · All proxy testing guides · Open the proxy tester