File Attachments

⚠️ This endpoint is deprecated. Use Upload a file 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.

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

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

Path parameters

company_idinteger required
Example:1

Existing company identifier (id)

Request body multipart/form-data

filestring binary required

The file you want to upload. Allowed content types:

  • image/png
  • image/jpeg
  • image/tiff
  • image/bmp
  • image/gif
  • application/pdf
filenamestring

Name of the file. If not provided, the default value will be the uploaded file name.

Example request

{
  "filename": "Invoice42.pdf"
}

Response

Returns the created attachment

idinteger required
urlstring required

URL to the uploaded file.

filenamestring required
created_atstring date-time required
updated_atstring date-time required

Example response

{
  "url": "http://www.pennylane.com/rails/active_storage/blobs/redirect/eyJfc..==--26d6e7391dd728fae2cde59bd3fbe4dd11e20a95/Invoice42.pdf",
  "created_at": "2023-08-30T10:08:08.146343Z",
  "updated_at": "2023-08-30T10:08:08.146343Z"
}

Changes