---
title: Create
slug: create
docTags: 
createdAt: 2022-01-05T08:54:05.000Z
---

Link Enterprise provides a web service endpoint that will allow you to create a document.

The following endpoint allows the following capabilities.

1. Create a File
2. Create a File with 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": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"filenet\" to let Link Enterprise know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the filenet system configured in docuflow."
      },
      {
        "name": "fileLocation",
        "kind": "required",
        "type": "string",
        "description": "file location in local system that needs to be stored in filenet.",
        "children": []
      },
      {
        "name": "repository",
        "kind": "required",
        "type": "string",
        "description": "filenet repository Value",
        "children": []
      },
      {
        "name": "location",
        "kind": "required",
        "type": "string",
        "description": "filenet folder where the document need to be created.",
        "children": []
      },
      {
        "name": "domain",
        "kind": "required",
        "type": "string",
        "description": "Filenet Domain name",
        "children": []
      },
      {
        "name": "checkout",
        "kind": "optional",
        "type": "string",
        "description": "If true, Enables file checkout ",
        "children": []
      },
      {
        "name": "dateTimeFormat",
        "kind": "required",
        "type": "string",
        "description": "Update datetime property in this provided format. ",
        "children": []
      },
      {
        "name": "checkinAsMinor",
        "kind": "optional",
        "type": "string",
        "description": "If true, The document is checkedIn as minor.",
        "children": []
      },
      {
        "name": "findCurrent",
        "kind": "optional",
        "type": "string",
        "description": "Enable to search for the latest version of Document.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "VzFOzYGCxsoPbWzdx0yew",
        "code": "{\n\t\"docId\": [\n\t\t\"{18CFCD6C-FFBF-CC9C-8780-89272DA000}\",\n\t\tnull,\n\t\tnull\n\t]\n}",
        "language": "200"
      },
      {
        "id": "VQkVXQFKVKg-X3yyvKCWC",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "VzFOzYGCxsoPbWzdx0yew"
  },
  "examples": {
    "languages": [
      {
        "id": "CXPum3DlkEh5CtlxE_mJB",
        "code": "{\n   \"cmsName\":\"Name of the filenet system configured in Link Enterpri.\",  \n    \"repository\":\"Filenet_Repository\",\n \"selectedCMS\":\"filenet\",\n \"domain\":\"Domain_Name\",\n\t\"checkout\":false,\n\t\"dateTimeFormat\":\"MM/dd/yyyy hh:mm:ss a z\",\n   \"fileLocation\":\"C:\\\\someFolder\\\\someFile.txt\",\n   \"selectedCMS\":\"filenet\",\n\t\"checkinAsMinor\":false,\n\t\"findCurrent\":false,\n\t\"location\":\"/folderName\"\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "CXPum3DlkEh5CtlxE_mJB"
  },
  "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": "selectedCMS",
        "type": "string",
        "description": "Value should always be set to \"filenet\" to let Link Enterprise know which configured content system to search."
      },
      {
        "kind": "required",
        "name": "cmsName",
        "type": "string",
        "description": "Name of the filenet 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."
      },
      {
        "name": "fileLocation",
        "kind": "required",
        "type": "string",
        "description": "file location in local system that needs to be stored in filenet.",
        "children": []
      },
      {
        "name": "location",
        "kind": "optional",
        "type": "string",
        "description": "filenet folder where the document need to be created.",
        "children": []
      },
      {
        "name": "repository",
        "kind": "required",
        "type": "string",
        "description": "filenet repository Value",
        "children": []
      },
      {
        "name": "domain",
        "kind": "required",
        "type": "string",
        "description": "Filenet Domain name",
        "children": []
      },
      {
        "name": "type",
        "kind": "optional",
        "type": "string",
        "description": "Filenet Class name attached to the document. Default is \"Document\"",
        "children": []
      },
      {
        "name": "checkinAsMinor",
        "kind": "optional",
        "type": "string",
        "description": "If true, The document is checkedIn as minor.",
        "children": []
      },
      {
        "name": "findCurrent",
        "kind": "optional",
        "type": "string",
        "description": "Enable to search for the latest version of Document.",
        "children": []
      }
    ],
    "formDataParameters": []
  },
  "results": {
    "languages": [
      {
        "id": "0iMkCF4s-yKchRAaXWJq3",
        "code": "{\n\t\"docId\": [\n\t\t\"{18CFCD6C-FFBF-CC9C-8780-89272DA00}\",\n\t\tnull,\n\t\tnull\n\t]\n}",
        "language": "200"
      },
      {
        "id": "Idjmyl-woaWfo4s5K3_bg",
        "code": "",
        "language": "500"
      }
    ],
    "selectedLanguageId": "0iMkCF4s-yKchRAaXWJq3"
  },
  "examples": {
    "languages": [
      {
        "id": "YYkmw0EaCT-jCk9-cGJJs",
        "code": "{\n   \"cmsName\":\"Name of the sharepoint system configured in Link Enterpri.\",  \n    \"repository\":\"Filenet_Repository\",\n \"selectedCMS\":\"filenet\",\n \"domain\":\"Domain_Name\",\n\t\"checkout\":false,\n\t\"dateTimeFormat\":\"MM/dd/yyyy hh:mm:ss a z\",\n   \"fileLocation\":\"C:\\\\someFolder\\\\someFile.txt\",\n   \"selectedCMS\":\"filenet\",\n      \"type\":\"MetadataClassName\",\n\t\"checkinAsMinor\":false,\n\t\"findCurrent\":false,\n\t\"location\":\"/folderName\",\n\t\"mdArray\":[\n\t{\"md1\": \"metadataField\", \"md2\": \"metadataValue\"}]\n}",
        "language": "json"
      }
    ],
    "selectedLanguageId": "YYkmw0EaCT-jCk9-cGJJs"
  },
  "description": "Create a file with metadata",
  "currentNewParameter": {
    "label": "Body Parameter",
    "value": "bodyDataParameters"
  },
  "autoGeneratedAnchorSlug": "create-a-file-metadata",
  "legacyHash": "jwu3C_6nkyZkTjqhuztuj"
}
```
:::



