# To include content (or not) in HTTP 404 responses?

**URL:** <https://discuss.jsonapi.org/t/to-include-content-or-not-in-http-404-responses/786>\
**Category:** Uncategorized\
**Created:** [October 5, 2016, 4:55pm UTC](https://discuss.jsonapi.org/t/to-include-content-or-not-in-http-404-responses/786 "2016-10-05T16:55:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkblmarty](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@mkblmarty](https://discuss.jsonapi.org/u/mkblmarty)\
**Post date:** [October 5, 2016, 4:55pm UTC](https://discuss.jsonapi.org/t/to-include-content-or-not-in-http-404-responses/786/1 "2016-10-05T16:55:43Z")

</div>

Should HTTP 404 responses include content (i.e., a JSON document)? Would it go against the spec to omit content in the response, meaning no response body?

The [spec says]([http://http](http://http)://jsonapi.org/format/…

> A JSON object MUST be at the root of every JSON API request and response containing data.

The key word I see there is “containing data”. An HTTP 404 status code itself already communicates everything that needs to be known about the error. As the [HTTP 1.1 specs](https://tools.ietf.org/html/rfc2616#section-10.4.5) says about the 404 code:

> The server has not found anything matching the Request-URI. No  
> indication is given of whether the condition is temporary or  
> permanent. … This status code is commonly used when the server does not wish to  
> reveal exactly why the request has been refused, or when no other  
> response is applicable.

I’m not seeing any value right now in actually returning content with an HTTP 404 response, but I’d love to get others thoughts on the matter.

---

<div class="post-metadata">

**Author:** ![cd1](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/cd1/32/199_2.png) [@cd1](https://discuss.jsonapi.org/u/cd1)\
**Post date:** [March 20, 2017, 12:00pm UTC](https://discuss.jsonapi.org/t/to-include-content-or-not-in-http-404-responses/786/2 "2017-03-20T12:00:49Z")

</div>

`404 Not Found` is an error response, so you can include content as described in the section [Errors](http://jsonapi.org/format/#errors).
