---
title: "Upload a file to DMS"
method: POST
path: "/api/external/firm/v1/companies/{company_id}/dms/files"
tags: ["DMS (GED)"]
---

# Upload a file to DMS

`POST /api/external/firm/v1/companies/{company_id}/dms/files`

## Request

- Base URL: `https://app.pennylane.com`
- URL: `https://app.pennylane.com/api/external/firm/v1/companies/{company_id}/dms/files`
- Auth: OAuth 2
  - Authorization code: `https://app.pennylane.com/oauth/authorize`
  - Token URL: `https://app.pennylane.com/oauth/oauth/token` scopes: `dms_files:all`

Upload a file to DMS

> ℹ️
> This endpoint requires the following scope: `dms_files:all`

## Path parameters

- `company_id` integer, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file you want to upload to DMS. Allowed content types: - text/csv - text/plain - image/png - image/jpeg - image/tiff - image/bmp - image/gif - application/zip - application/zip-compressed - application/x-zip-compressed - application/pdf - application/vnd.ms-excel - application/vnd.openxmlformats-officedocument.spreadsheetml.sheet - application/msword - application/vnd.openxmlformats-officedocument.wordprocessingml.document - application/mbox - application/octet-stream - application/vnd.ms-outlook - application/vnd.oasis.opendocument.presentation - application/vnd.oasis.opendocument.spreadsheet - application/vnd.oasis.opendocument.text - application/vnd.apple.pages - application/vnd.apple.numbers
  - `name` string: Name of the file. If not provided, the default value will be the uploaded file name.
  - `parent_folder_id` integer: ID of the parent folder. If not provided, the file will be uploaded at root level.

## Response `201`

Returns the created DMS file

- object
  - `id` integer, required: ID of the file
  - `name` string, required: Name of the file
  - `path` string, required: Path of the file
  - `parent_folder` object, nullable, required: Parent folder containing this file. `null` if file is at root level.
    - `id` integer, required: ID of the parent folder
  - `url` string, required: URL to download the file
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access to this resource forbidden
- `404`: The resource was not found
- `422`: Unprocessable content

---

[API](https://skmtc.dev/pennylane/apis/referentials.md) - [All operations](https://skmtc.dev/pennylane/apis/referentials/llms.txt) - [OpenAPI document](https://skmtc.dev/pennylane/apis/referentials/revisions/256ecc544f85?raw)
