# Creating a new Document via the API?

**URL:** <https://community.fibery.io/t/creating-a-new-document-via-the-api/2889>\
**Category:** Get Help\
**Created:** [May 30, 2022, 6:46pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889 "2022-05-30T18:46:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [May 30, 2022, 6:46pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/1 "2022-05-30T18:46:58Z")

</div>

I can’t find any info on how to create a new Document via the API. Any help?

---

<div class="post-metadata">

**Author:** ![Pawel\_Badenski](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/pawel_badenski/32/1980_2.png) [@Pawel\_Badenski](https://community.fibery.io/u/Pawel_Badenski)\
**Post date:** [June 24, 2022, 6:27pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/2 "2022-06-24T18:27:39Z")

</div>

This might be undocumented on purpose so be careful!

I had a similar problem and found that documents are of type “fibery/view”. You can create document content via “/api/documents” ([Fibery API](https://api.fibery.io/#update-rich-text-field)) and then create a document entity via “fibery.entity/create” with “type”: “fibery/view”. For details check your schema under “fibery/view”. Query below uses existing document to give you an idea - should take you quite far:

```auto
 {
  "command": "fibery.entity/query",
  "args": {
    "query": {
      "q/from": "fibery/view",
      "q/select": [
        "fibery/id",
        "fibery/container-type",
        "fibery/container-entity-id",
        {
          "fibery/container-app": [
            "fibery/id"
          ]
        },
        "fibery/meta",
        "fibery/public-id",
        "fibery/type",
        "fibery/name",
      ],
      "q/where": ["=", ["fibery/public-id"], "$id"],
      "q/limit": 1
    },
    "params": {
      "$id": "xxx"
    }
  }
}

```

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [June 24, 2022, 7:38pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/3 "2022-06-24T19:38:58Z")

</div>

> [@Are Documents being deprecated?](https://community.fibery.io/t/are-documents-being-deprecated/2947/4):
>
> fibery/view will be removed from Core, so I don’t think Add Document to entity will work with any kind of workaround.

@mdubakov, is it safe to use @Pawel_Badenski’s suggestion to create a Document? Or will that interface be deprecated?

---

<div class="post-metadata">

**Author:** ![Andray\_Shotkin](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/andray_shotkin/32/1531_2.png) [@Andray\_Shotkin](https://community.fibery.io/u/Andray_Shotkin)\
**Post date:** [July 6, 2022, 9:39am UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/4 "2022-07-06T09:39:29Z")

</div>

Hi!  
there will be no `fibery/view` type at all.  
We have a separate task to make public API for documents/views management out of our internal API so it will be available soon - 2-3 weeks.

Bottom line:

> I can’t find any info on how to create a new Document via the API. Any help?

Currently there is no public API for view/documents. It will be available in 2-3 weeks i hope 🙏

---

<div class="post-metadata">

**Author:** ![tpaktop](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/tpaktop/32/6394_2.png) [@tpaktop](https://community.fibery.io/u/tpaktop)\
**Post date:** [January 24, 2023, 3:57pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/5 "2023-01-24T15:57:03Z")

</div>

Has this been completed?

---

<div class="post-metadata">

**Author:** ![Matt\_Blais](https://sea2.discourse-cdn.com/flex020/user_avatar/community.fibery.io/matt_blais/32/1464_2.png) [@Matt\_Blais](https://community.fibery.io/u/Matt_Blais)\
**Post date:** [January 27, 2023, 11:29pm UTC](https://community.fibery.io/t/creating-a-new-document-via-the-api/2889/6 "2023-01-27T23:29:06Z")

</div>

@Andray_Shotkin - Still hoping there is SOME WAY to access Documents from the API (or graphql).

Where does this stand today?
