---
title: "Upload a file"
method: POST
path: "/files"
tags: ["Files"]
---

# Upload a file

`POST /files`

## Request

- Base URL: `https://api.sandbox.monite.com/v1`
- URL: `https://api.sandbox.monite.com/v1/files`
- Auth: HTTP bearer

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.

## Headers

- `x-monite-version` string, required

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: The file to upload.
  - `file_type` 'ocr_results' | 'ocr_files' | 'payables' | 'receivables' | 'delivery_notes' | 'receipts' | 'userpics' | 'entity_logo' | 'companies_logo' | 'zip' | 'identity_documents' | 'additional_identity_documents' | 'receivable_signatures' | 'einvoices_xml' | 'attachments', required

## Response `201`

Successful Response

- FileResponse
  - `id` string, uuid, required: A unique ID assigned to this file.
  - `created_at` string, date-time, required: Date and time when this file was uploaded to or created in Monite. Timestamps follow the ISO 8601 format.
  - `updated_at` string, date-time, required: Date and time when this file was last updated in Monite. Timestamps follow the ISO 8601 format.
  - `file_type` string, required: Possible values: * `additional_identity_documents` and `identity_documents` - [entity verification documents](https://docs.monite.com/payments/onboarding/via-api/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`.
  - `md5` string, required: The MD5 hash of the file.
  - `mimetype` string, required: The file's media type, for example, `application/pdf` or `image/png`.
  - `name` string, required: The original file name (if available).
  - `region` string, required: Geographical region of the data center where the file is stored.
  - `s3_bucket` string, required: Unused.
  - `s3_file_path` string, required: Unused.
  - `size` integer, required: The file size in bytes.
  - `url` string, required: The URL to download the file.

## Other responses

- `401`: The `Authorization` header is missing or contains an invalid or expired access token. See [Authentication](https://docs.monite.com/api/concepts/authentication) to learn how to authenticate API calls.
- `422`: Validation Error
- `429`: API rate limit has been exceeded. Check the response headers for the rate limit information.

---

[API](https://skmtc.dev/monite/apis/monite-2.md) - [All operations](https://skmtc.dev/monite/apis/monite-2/llms.txt) - [OpenAPI document](https://skmtc.dev/monite/apis/monite-2/revisions/4299ccf95edb?raw)
