---
title: "Upload a file"
method: POST
path: "/api/external/firm/v1/companies/{company_id}/file_attachments"
tags: ["File Attachments"]
deprecated: true
---

# Upload a file

`POST /api/external/firm/v1/companies/{company_id}/file_attachments`

## Request

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

> **Deprecated.**

> ⚠️ This endpoint is deprecated. Use [Upload a file](https://pennylane.readme.io/reference/postfileattachments) from the Company API v2 instead. Your firm token can call it for any company of your firm through the `X-Company-Id` header. [Learn how to use your firm token with the Company API v2](https://pennylane.readme.io/docs/firm-api#using-your-firm-token-with-the-company-api-v2).

Upload a file to attach to any resource that provides a `file_attachment_id`.

The maximum allowed file size is 100MB.
Note that this will not upload a file into the DMS (GED).


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

## Path parameters

- `company_id` integer, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file you want to upload. Allowed content types: - image/png - image/jpeg - image/tiff - image/bmp - image/gif - application/pdf
  - `filename` string: Name of the file. If not provided, the default value will be the uploaded file name.

## Response `201`

Returns the created attachment

- object
  - `id` integer, required
  - `url` string, required: URL to the uploaded file.
  - `filename` string, required
  - `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

## Changes

- **2026-11-03** `256ecc544f85`: 1 info
  - endpoint deprecated

[Operation history](https://skmtc.dev/pennylane/apis/referentials/changes/api/external/firm/v1/companies/:company_id/file_attachments/post.md)

---

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