No Content
Success (2xx)The 204 No Content status code indicates that the server has successfully fulfilled the request and there is no additional content to send in the response body. This is commonly used for DELETE requests, PUT/PATCH updates that do not return the modified resource, and save operations where no response data is needed.
What is HTTP 204 No Content?
HTTP 204 No Content is a success (2xx) status code. The 204 No Content status code indicates that the server has successfully fulfilled the request and there is no additional content to send in the response body. This is commonly used for DELETE requests, PUT/PATCH updates that do not return the modified resource, and save operations where no response data is needed. Common causes include successful delete request and put/patch update with no response body needed. This response indicates the server processed the request as expected.
Example Response
HTTP/1.1 204 No Content
Common Causes
- • Successful DELETE request
- • PUT/PATCH update with no response body needed
- • Successful form save action
- • OPTIONS preflight response
What to Know
- 1. 204 is a success status — no fix needed
- 2. If you need the response body, the API may use 200 for that endpoint instead
- 3. A 204 response must not contain a body; if it does, something is misconfigured
Frequently Asked Questions
Can a 204 response include a body?
No. A 204 response must not contain a message body. If the server needs to return data, it should use 200 OK instead. Any body content in a 204 response should be ignored by the client.
When should I return 204 vs 200 for DELETE?
Use 204 when there is nothing useful to return after deletion. Use 200 if you want to return the deleted resource or a confirmation message. Both are valid for DELETE.
Why does 204 exist instead of just using 200?
204 explicitly communicates that there is no content to process, which is useful for client implementations. It tells the client not to navigate away from the current page and that no body parsing is needed.