201 Created

A create request completed and the server should make the resulting resource identifiable to the client.

All HTTP status codes

What does HTTP 201 mean?

Use 201 when the requested creation has happened, rather than merely entering a queue. The response can identify the new resource through Location or the request's target, and may include a representation of it. If a client reports a missing creation, compare the response with the database or storage outcome before submitting the same operation again.

An investigation example

Illustrative form-submission investigation
Status: 201 Created
Location: /enquiries/731
Client times out while reading the response body.
Action: locate enquiry 731 before offering a retry.
Verify: the enquiry exists once and contains the submitted fields.

When this response is used

  • An API creates a site, user, order or uploaded file after a POST request.
  • A PUT creates a resource at a URL that did not previously exist.

Diagnose the response

Follow the returned resource location and check that the created record contains the expected data.

  • Check how the API identifies the new resource: through Location or, when absent, the request target. Test retrieval where the API permits it; permission to create a resource does not automatically grant permission to read it.
  • Confirm persistence and any separate side effects that matter. Creating an order record, for example, does not necessarily mean payment or fulfilment has completed.
  • Use the API's idempotency mechanism if it provides one. Otherwise establish the earlier request's outcome before retrying; repeating a POST after a lost response can create duplicate records.

What it means for website monitoring

A page monitor does not exercise creation or detect duplicate submissions. Verify write workflows separately, using controlled test data and a cleanup process appropriate to the environment.

Reference