> ## Documentation Index
> Fetch the complete documentation index at: https://docs.commenda.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Upload files for incorporation

> Attach customer files to incorporation document requirements.

Use this flow when a customer needs to provide files such as passport scans, utility bills, or corporate documents for an incorporation. Incorporation documents are built from reusable Commenda OS files.

The file upload endpoint lives in the [Commenda OS Partner API](/engine/commendaos/partner-api/commenda-os-introduction) because files can be reused outside incorporation for KYC, entity records, registrations, and customer file attachments. The Incorporation API takes the resulting `fileId` and assigns it to a participant document slot.

## Flow

1. Upload the file with [Upload a file](/engine/commendaos/partner-api/commenda-os-files-POST), sending the bytes as `multipart/form-data`. Save the returned `file.fileId`.
2. Upsert the `fileId` into a participant document slot with [Upsert a participant document](/engine/incorporation/partner-incorporation-participant-documents-PUT).

## Endpoint map

| Step                              | Endpoint                                                                                             | API surface               | Output                |
| --------------------------------- | ---------------------------------------------------------------------------------------------------- | ------------------------- | --------------------- |
| Upload file                       | `POST /partner/commenda-os/customers/{customerId}/files`                                             | Commenda OS Partner API   | `file.fileId`         |
| Upsert typed participant document | `PUT /partner/incorporation/{incorporationId}/participants/{participantId}/documents/{documentKind}` | Partner Incorporation API | `document.documentId` |

## Important handoffs

* The upload endpoint accepts only a `file` multipart part. It returns a `fileId` and nothing else — any metadata set by future attach calls is layered on top of the underlying file.
* Use `file.fileId` when upserting incorporation participant documents. The upsert assigns the file to the participant document slot.
* Uploads are capped at 100 MB per request, must use one of the accepted MIME types, and time out after 120 seconds. See [Upload a file](/engine/commendaos/partner-api/commenda-os-files-POST) for the full limits and error codes. Contact Commenda if you need to upload files larger than 100 MB.
