Skip to content

// Successful response

201 Created

The request succeeded and created a new resource. A Location header can identify the new resource.

Common causes

  • A POST created a resource.
  • A PUT created the resource at a client-selected URI.
  • The server completed creation synchronously.

Troubleshooting

  • Check that the response identifies the created resource.
  • Return a Location header when the resource has a stable URL.
  • Use 202 Accepted instead when processing has only been queued.

Example response

HTTP/1.1 201 Created
Location: /payments/pay_123
Content-Type: application/json

{ "id": "pay_123", "status": "pending" }

Related status codes

// GET STARTED

Inspect the complete API response.

Use REST Test to send a request and review its status, headers, timing and body together.

Start for free