201 Created: When a Request Makes Something New

A 201 Created status means a request made a new resource, the correct signal for successful creation in APIs and forms.

Quick Definition

201 Created is the status code when a request creates a new resource.

What It Is

A 201 Created means a request successfully created a new resource.

It is the correct success signal for creation.

The response should point to the new resource.

Why It Matters

  • It makes APIs behave correctly.
  • Clients know the resource was created.
  • It prevents duplicate creation on retries.
  • Clean statuses support integrations.
  • It is part of a healthy technical foundation.

How to Do It

  • Return 201 after a successful create.
  • Include the Location of the new resource.
  • Use it consistently in API design.
  • Document the response shape.
  • Test creation flows end to end.

What to Avoid

  • Returning 200 for creations.
  • Omitting the new resource location.
  • Duplicate resources from retries.
  • Inconsistent statuses across endpoints.
  • Assuming 201 without a created resource.

Common Mistakes

  • 201 for updates instead of creates.
  • No Location header on create.
  • Creating before validating input.
  • Swallowing errors as success.
  • Not testing the response shape.
Example in Practice

Before: an API returns 200 for every success.

After: the team returns 201 on creates with a Location.

The result: clients integrate cleanly and retries stop duplicating.

The lesson: the status code is part of the contract.

💡

Quick Tip

Let the status code match what happened: 201 means something new exists.

Frequently Asked Questions

A status code meaning a request successfully created a new resource.
Whenever a request results in a brand-new resource.
A Location header pointing to the resource that was created.
Correct APIs and integrations keep the technical foundation that supports content healthy.
No, updates should use other success statuses like 200.

201 Created, in Short

Creation deserves its own success signal.

Return 201 with a Location to the new thing.

Status codes are part of good design.