**Source URL:** https://limited.veevavault.dev/medical/vault-api/api-reference/21.3/file-staging/create-folder-or-file.md

# Create Folder or File



Upload files or folders up to 50MB to the File Staging Server. To upload files larger than 50MB, see [Resumable Upload Sessions](/vault-api/api-reference/21.3/file-staging/resumable-upload-sessions). You can only create one file or folder per request.

<Endpoint path="/api/{version}/services/file_staging/items" method="POST"></Endpoint>

## Headers {#headers}

<FieldTable>
| Name | Description |
| --- | --- |
| `Content-Type` | `multipart/form-data` |
| `Accept` | `application/json` (default) or `application/xml` |
| `Content-MD5` | Optional: The MD5 checksum of the file being uploaded. |
</FieldTable>

## Body Parameters {#body-parameters}

<FieldTable>
| Name | Description |
| --- | --- |
| `kind` | The kind of item to create. This can be either `file` or `folder`. |
| `path` | The absolute path, including file or folder name, to place the item in the file staging server. This path is specific to the authenticated user. Admin users can access the root directory.  All other users can only access their own user directory. |
| `overwrite` | If set to `true`, Vault will overwrite any existing files with the same name at the specified destination. For folders, this is always `false`. |
</FieldTable>

## File Upload {#file-upload}

To upload a file, use the multi-part attachment with the file component `"file={file_name}"`. The maximum allowed file size is 50MB.

## Uploading Files to the Inbox Directory {#uploading-files-to-the-inbox-directory}

You can create *Staged* documents by uploading files to the *Inbox* directory on your Vault's file staging server. [Learn more in Vault Help](https://platform.veevavault.help/en/lr/38653).

## Request : Create a File {#request--create-a-file}

<CodeExample title="">
```
curl -L -X POST -H "Authorization: {SESSION_ID}" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "path=/Wonder Drug Reference.docx" \
-F "kind=file" \
-F "overwrite=true" \
-F "file=@/Wonder Drug Reference.docx"\
https://myvault.veevavault.com/api/v20.3/services/file_staging/items

```
</CodeExample>

## Response {#response}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "data": {
       "kind": "file",
       "path": "/Wonder Drug Reference.docx",
       "name": "Wonder Drug Reference.docx",
       "size": 11922,
       "file_content_md5": "3b2130fbfa377c733532f108b5e50411"
   }
}

```
</CodeExample>

## Request : Create a Folder {#request--create-a-folder}

<CodeExample title="">
```
curl -L -X POST -H "Authorization: {SESSION_ID}" \
-H "Accept: application/json" \
-H "Content-Type: multipart/form-data" \
-F "path=/u10001400/cholecap2021" \
-F "kind=folder" \
https://myvault.veevavault.com/api/v20.3/services/file_staging/items

```
</CodeExample>

## Response {#response-1}

<CodeExample title="">
```
{
   "responseStatus": "SUCCESS",
   "data": {
       "kind": "folder",
       "path": "/u10001400/cholecap2021/",
       "name": "cholecap2021"
   }
}

```
</CodeExample>

---

**Previous:** [Download Item Content](/medical/vault-api/api-reference/21.3/file-staging/download-item-content)  
**Next:** [Update Folder or File](/medical/vault-api/api-reference/21.3/file-staging/update-folder-or-file)