Creating a new Document via the API?

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

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) 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:

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

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