Error Codes Wiki

HTTP 204 No Content — What It Means & How to Fix It

Informational2xx success

Overview

The HTTP 204 No Content status code indicates the server successfully processed the request but is not returning any content in the response body.

Key Details

  • This status code is commonly used for DELETE requests where no response body is needed.
  • It can also be used for PUT/PATCH updates that do not need to return the updated resource.
  • The response must not include a body.
  • Headers in the response may contain updated metadata.

Common Causes

  • A DELETE request successfully removed a resource.
  • A PUT or PATCH request updated a resource without needing to return data.
  • A form submission that requires no response content.

Steps

  1. 1Do not attempt to parse a response body from a 204 response.
  2. 2Check response headers for any updated metadata like ETag.
  3. 3If you need the updated resource after a PATCH, consider using 200 with a body instead.
  4. 4Update client-side state based on the successful operation.

Tags

httpsuccessno-contentdeleterest-api

Related Items

More in 2xx Success

Frequently Asked Questions

Use 204 for successful operations where the client does not need a response body, such as DELETE operations or updates where the client already has the data.