---
title: Create
slug: docuflow-guides/create
createdAt: 2022-01-05T08:54:05.000Z
---

Docuflow provides a web service endpoint that will allow you to create a document or folder.

The following endpoint allows the following capabilities.

1. Create a File
2. Create a File with metadata
3. Create a folder
4. Create a folder with metadata
5. Create a nested folder structure (with parent obtaining metadata)
6. Create a single level tree structure (with parent obtaining metadata)



:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a File",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "qY6_5ApAGJWnv1YoKFjlh",
        "code": "",
        "language": "200"
      },
      {
        "id": "pLh7o5ECp7uOV1vGzXb4v",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "qY6_5ApAGJWnv1YoKFjlh"
  },
  "examples": {
    "languages": [
      {
        "id": "T0IV7Ht9SXKD-JDtsCjFz",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":null,\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "T0IV7Ht9SXKD-JDtsCjFz"
  },
  "description": "Create a file with no metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-file",
  "legacyHash": "LTZYKRF4XjDFS4dN8yyEx"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "http://localhost:82/scrud/create",
  "name": "Create a File (metadata)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "mdArray",
        "type": "Array",
        "description": "A JSON array where each index is a json object with the keys \"md1\" and \"md2\". Where md1 is the column name, and md2 is the value to be inserted in that column."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "1Cba2F6sFZETriKzoK9GY",
        "code": "",
        "language": "200"
      },
      {
        "id": "u4Te0pGo-igKcnS-FcU5f",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "1Cba2F6sFZETriKzoK9GY"
  },
  "examples": {
    "languages": [
      {
        "id": "ZPCvsJJe70EVgXirz9iO6",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":\"insertMetaDataTemplate\",\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"mdArray\":[\r\n      {\r\n         \"md1\":\"insertColumnName\",\r\n         \"md2\":\"insertValue\"\r\n      },\r\n      {\r\n         \"md1\":\"someVendor\",\r\n         \"md2\":\"VersaFile Inc\"\r\n      }\r\n\t\t ]\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "ZPCvsJJe70EVgXirz9iO6"
  },
  "description": "Create a file with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-file-metadata",
  "legacyHash": "jwu3C_6nkyZkTjqhuztuj"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a Folder",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "custom1",
        "type": "string",
        "description": "Name of the folder you would like to create."
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "5qKBBr19COKL70lS1Pxf2",
        "code": "",
        "language": "200"
      },
      {
        "id": "IjhcKVaRL84ItAn3PV6w9",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "5qKBBr19COKL70lS1Pxf2"
  },
  "examples": {
    "languages": [
      {
        "id": "nEvLnbjbW2qpwrRwUWJoE",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"type\":null,\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"custom1\":\"insert Folder Name\"\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "nEvLnbjbW2qpwrRwUWJoE"
  },
  "description": "Create a folder with no metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-folder",
  "legacyHash": "wIxsI8djIx6QeX1UJGwdT"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a Folder (metadata)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "custom1",
        "type": "string",
        "description": "Name of the folder you would like to create."
      },
      {
        "kind": "required",
        "name": "mdArray",
        "type": "Array",
        "description": "A JSON array where each index is a json object with the keys \"md1\" and \"md2\". Where md1 is the column name, and md2 is the value to be inserted in that column."
      },
      {
        "kind": "required",
        "name": "metaDataFolderFlag",
        "type": "Boolean",
        "description": "true if setting metadata for folders\nfalse if not setting metadata for folders"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "J4JbmCuon32_XmY7qOBW5",
        "code": "",
        "language": "200"
      },
      {
        "id": "xnlS3q42_c9CQSY_Bxnrg",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "J4JbmCuon32_XmY7qOBW5"
  },
  "examples": {
    "languages": [
      {
        "id": "da-O059GxjgcBko54AzBG",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":\"insertMetaDataTemplate\",\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"mdArray\":[\r\n      {\r\n         \"md1\":\"insertColumnName\",\r\n         \"md2\":\"insertValue\"\r\n      },\r\n      {\r\n         \"md1\":\"someVendor\",\r\n         \"md2\":\"VersaFile Inc\"\r\n      }\r\n\t\t ],\r\n       \"custom1\":\"folderName\",\r\n      \"metaDataFolderFlag\":true\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "da-O059GxjgcBko54AzBG"
  },
  "description": "Create a Folder with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-folder-metadata",
  "legacyHash": "Jv0MnAE3164FpSznGPg08"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a Folder (metadata and nested)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "custom1",
        "type": "string",
        "description": "Name of the folder you would like to create. If using nested the delimiter is #DFLOW#"
      },
      {
        "kind": "required",
        "name": "mdArray",
        "type": "Array",
        "description": "A JSON array where each index is a json object with the keys \"md1\" and \"md2\". Where md1 is the column name, and md2 is the value to be inserted in that column."
      },
      {
        "kind": "required",
        "name": "enableNested",
        "type": "Boolean",
        "description": "true (if wanting each folder to have one child in a nested manner)\n\nfalse (if all children are located under the first folder name)"
      },
      {
        "kind": "required",
        "name": "metaDataFolderFlag",
        "type": "Boolean",
        "description": "true if setting metadata for folders\nfalse if not setting metadata for folders"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "Ys7bdjDt95kNOjD3mo-Ts",
        "code": "",
        "language": "200"
      },
      {
        "id": "w_RsvemAQH63D1PE6203Q",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "Ys7bdjDt95kNOjD3mo-Ts"
  },
  "examples": {
    "languages": [
      {
        "id": "3-nqPFViU8KL-S_bHA0Re",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":\"insertMetaDataTemplate\",\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"mdArray\":[\r\n      {\r\n         \"md1\":\"insertColumnName\",\r\n         \"md2\":\"insertValue\"\r\n      },\r\n      {\r\n         \"md1\":\"someVendor\",\r\n         \"md2\":\"VersaFile Inc\"\r\n      }\r\n\t\t ],\r\n       \"custom1\":\"folderName#DFLOW#folderName2#DFLOW#folderName3\",\r\n      \"metaDataFolderFlag\":true,\r\n      \"enableNested\":true\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "3-nqPFViU8KL-S_bHA0Re"
  },
  "description": "Create a Folder with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-folder-metadata-and-nested",
  "legacyHash": "wCBvhfT17RLyLiW_SsYpj"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a Folder (metadata and nested false)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "custom1",
        "type": "string",
        "description": "Name of the folder you would like to create. If using nested the delimiter is #DFLOW#"
      },
      {
        "kind": "required",
        "name": "mdArray",
        "type": "Array",
        "description": "A JSON array where each index is a json object with the keys \"md1\" and \"md2\". Where md1 is the column name, and md2 is the value to be inserted in that column."
      },
      {
        "kind": "required",
        "name": "enableNested",
        "type": "Boolean",
        "description": "true (if wanting each folder to have one child in a nested manner)\n\nfalse (if all children are located under the first folder name)"
      },
      {
        "kind": "required",
        "name": "metaDataFolderFlag",
        "type": "Boolean",
        "description": "true if setting metadata for folders\nfalse if not setting metadata for folders"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "8Li-8RQVt1280crDvia4M",
        "code": "",
        "language": "200"
      },
      {
        "id": "-HQzeVvt5xBsR-Q-3W8pV",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "8Li-8RQVt1280crDvia4M"
  },
  "examples": {
    "languages": [
      {
        "id": "_jvOAln50OvCF-9RzrZsU",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":\"insertMetaDataTemplate\",\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"mdArray\":[\r\n      {\r\n         \"md1\":\"insertColumnName\",\r\n         \"md2\":\"insertValue\"\r\n      },\r\n      {\r\n         \"md1\":\"someVendor\",\r\n         \"md2\":\"VersaFile Inc\"\r\n      }\r\n\t\t ],\r\n       \"custom1\":\"folderName#DFLOW#folderName2#DFLOW#folderName3\",\r\n      \"metaDataFolderFlag\":true,\r\n      \"enableNested\":false\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "_jvOAln50OvCF-9RzrZsU"
  },
  "description": "Create a Folder with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-folder-metadata-and-nested-false",
  "legacyHash": "GD-3v2PH9Zpl5L7CzrcqT"
}
```
:::

:::ApiMethodV2
```json
{
  "tab": "examples",
  "url": "https://localhost:82/scrud/create",
  "name": "Create a Folder (no metadata and nested false)",
  "method": "POST",
  "request": {
    "pathParameters": [],
    "queryParameters": [],
    "headerParameters": [],
    "bodyDataParameters": [
      {
        "kind": "required",
        "name": "type",
        "type": "string",
        "description": "Metdata template name in box."
      },
      {
        "kind": "required",
        "name": "location",
        "type": "string",
        "description": "Folder id where the file will be located in box."
      },
      {
        "kind": "required",
        "name": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"box\" to let docuflow know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the box system configured in docuflow."
      },
      {
        "kind": "required",
        "name": "custom1",
        "type": "string",
        "description": "Name of the folder you would like to create. If using nested the delimiter is #DFLOW#"
      },
      {
        "kind": "required",
        "name": "mdArray",
        "type": "Array",
        "description": "A JSON array where each index is a json object with the keys \"md1\" and \"md2\". Where md1 is the column name, and md2 is the value to be inserted in that column."
      },
      {
        "kind": "required",
        "name": "enableNested",
        "type": "Boolean",
        "description": "true (if wanting each folder to have one child in a nested manner)\n\nfalse (if all children are located under the first folder name)"
      },
      {
        "kind": "required",
        "name": "metaDataFolderFlag",
        "type": "Boolean",
        "description": "true if setting metadata for folders\nfalse if not setting metadata for folders"
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "Pmc3Rv_YAhRBsGJvgUNZh",
        "code": "",
        "language": "200"
      },
      {
        "id": "UyQPeq8M7Bpu1wYNquraT",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "Pmc3Rv_YAhRBsGJvgUNZh"
  },
  "examples": {
    "languages": [
      {
        "id": "jyZCNzh5Dm82K7jndypzT",
        "code": "{   \r\n    \"cmsName\": \"Name of the box system configured in docuflow.\",\r\n    \"fileLocation\": \"C:\\\\someFolder\\\\someFile.txt\",\r\n    \"type\":null\r\n    \"location\":\"Insert unique box folder id\",\r\n    \"selectedCMS\":\"box\",\r\n    \"custom1\":\"folderName#DFLOW#folderName2#DFLOW#folderName3\",\r\n   \"metaDataFolderFlag\":false,\r\n    \"enableNested\":false\r\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "jyZCNzh5Dm82K7jndypzT"
  },
  "description": "Create a Folder with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-folder-no-metadata-and-nested-false",
  "legacyHash": "iamkEN4dx3y-wyZdXaiVe"
}
```
:::



