For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
API StatusPartner Portal
HomeGuidesAPI ExplorerSDKsGitHubSupport
HomeGuidesAPI ExplorerSDKsGitHubSupport
  • API Concepts
    • Overview
    • Environments and URLs
    • Authentication
    • API versioning
    • Rate limiting
    • HTTP headers
    • Pagination, sorting, and filtering
  • General
  • Common
  • Accounts payable
  • Accounts receivable
  • E-invoicing
  • Payments
  • Accounting integration
  • Expense management
  • Utilities
      • GETGet files
      • POSTUpload a file
      • GETGet a file by ID
      • DELDelete a file
LogoLogo
API StatusPartner Portal
UtilitiesFiles

Upload a file

POST
/files
POST
/v1/files
$curl -X POST https://api.sandbox.monite.com/v1/files \
> -H "x-monite-version: 2024-05-25" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: multipart/form-data" \
> -F file=@<file1> \
> -F file_type="ocr_results"
1{
2 "id": "id",
3 "created_at": "2024-01-15T09:30:00Z",
4 "updated_at": "2024-01-15T09:30:00Z",
5 "file_type": "file_type",
6 "md5": "60997cbcc1a6fb2ec37d389ffa8588db",
7 "mimetype": "application/pdf",
8 "name": "timesheet.pdf",
9 "region": "eu-central-1",
10 "s3_bucket": "s3_bucket",
11 "s3_file_path": "s3_file_path",
12 "size": 120101,
13 "url": "https://bucketname.s3.amazonaws.com/path/to/timesheet.pdf"
14}
Upload files for use as: * supplementary attachments for invoices, quotes, and credit notes, * [entity verification documents](https://docs.monite.com/payments/onboarding/via-api/documents) for payments onboarding. Maximum file size is 15 MB. Each uploaded file is assigned a unique `id` that you can use to reference this file elsewhere. Both partner tokens and entity user tokens can be used for authentication.
Was this page helpful?
Previous

Get a file by ID

Next
Built with

Upload files for use as:

  • supplementary attachments for invoices, quotes, and credit notes,
  • entity verification documents for payments onboarding.

Maximum file size is 15 MB. Each uploaded file is assigned a unique id that you can use to reference this file elsewhere.

Both partner tokens and entity user tokens can be used for authentication.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

x-monite-versionstringRequired

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The file to upload.
file_typeenumRequired
The intended purpose of the file. Possible values: * `attachments` - supplemental attachments for accounts receivable invoices, quotes, and credit notes. * `identity_documents` - company registration documents or a person's identity documents for payments onboarding. * `additional_identity_documents` - documents that verify a person's address. Other enum values are not supposed to be used directly.

Response

Successful Response
idstringformat: "uuid"
A unique ID assigned to this file.
created_atdatetime
Date and time when this file was uploaded to or created in Monite. Timestamps follow the ISO 8601 format.
updated_atdatetime
Date and time when this file was last updated in Monite. Timestamps follow the ISO 8601 format.
file_typestring

Possible values:

  • additional_identity_documents and identity_documents - entity verification documents uploaded for payments onboarding.
  • attachments - supplementary attachments for accounts receivable invoices, quotes, and credit notes.
  • delivery_notes - auto-generated PDF versions of delivery notes.
  • einvoices_xml - e-invoice XML generated when sending e-invoices.
  • payables - payables (bills) received via email or uploaded via API.
  • receivable_signatures - images of customer signatures provided during quote acceptance.
  • receivables - auto-generated PDF versions of invoices, quotes, and credit notes.
  • zip - data export archives created by POST /data_exports.
md5string
The MD5 hash of the file.
mimetypestring

The file’s media type, for example, application/pdf or image/png.

namestring

The original file name (if available).

regionstring
Geographical region of the data center where the file is stored.
s3_bucketstring
Unused.
s3_file_pathstring
Unused.
sizeinteger
The file size in bytes.
urlstring
The URL to download the file.

Errors

401
Post Files Request Unauthorized Error
422
Post Files Request Unprocessable Entity Error
429
Post Files Request Too Many Requests Error

The intended purpose of the file. Possible values:

  • attachments - supplemental attachments for accounts receivable invoices, quotes, and credit notes.
  • identity_documents - company registration documents or a person’s identity documents for payments onboarding.
  • additional_identity_documents - documents that verify a person’s address.

Other enum values are not supposed to be used directly.