# Clarification about top-level document structure

**URL:** <https://discuss.jsonapi.org/t/clarification-about-top-level-document-structure/1002>\
**Category:** Uncategorized\
**Created:** [June 19, 2017, 6:15am UTC](https://discuss.jsonapi.org/t/clarification-about-top-level-document-structure/1002 "2017-06-19T06:15:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lorenzomar](https://avatars.discourse-cdn.com/v4/letter/l/db5fbb/32.png) [@lorenzomar](https://discuss.jsonapi.org/u/lorenzomar)\
**Post date:** [June 19, 2017, 6:15am UTC](https://discuss.jsonapi.org/t/clarification-about-top-level-document-structure/1002/1 "2017-06-19T06:15:31Z")

</div>

Hello to everybody 🙂 I’m new here, nice to meet all of you…

I used JSON API for some time now and i appreciate all the good job done to made to write such a good and versatile specification 🙂

From the beginning i had a question about what the documentation says on top-level structure:

```auto
A document MUST contain at least one of the following top-level members:

data: the document’s “primary data”
errors: an array of error objects
meta: a meta object that contains non-standard meta-information.

The members data and errors MUST NOT coexist in the same document.

```

Is it correct to say that at least data or error field must be present? or are they all optionals?

Thanks for your help.  
Cheers,  
Lorenzo

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.jsonapi.org/steveklabnik/32/2_2.png) [@steveklabnik](https://discuss.jsonapi.org/u/steveklabnik)\
**Post date:** [June 19, 2017, 7:14pm UTC](https://discuss.jsonapi.org/t/clarification-about-top-level-document-structure/1002/2 "2017-06-19T19:14:01Z")

</div>

As long as you have one of the three, the other two are optional.

I think in theory, it’s basically non-sensical to have a meta-only top-level response, but it is technically allowed by the spec.
