---
title: "Migrate File"
method: POST
path: "/internal/files/migrate"
tags: ["internal"]
---

# Migrate File

`POST /internal/files/migrate`

Store one bulk-imported document for `company_id` without running the pipeline.

One file per request, mirroring `POST /files` minus its multi-file form: an import driver
wants to know which of ten thousand documents failed, and a partial success inside a
batched request cannot say that.

The folder can be given as `project_id` or, for a driver working from the source
system's folder names, as `project_name` — created for this vendor if no folder of that
name is there yet. Giving both is refused rather than resolved.

The rows are stamped with the time of the import, not the document's date in the system
being migrated from — `created` reads as the migration date by design.

## Response `200`

Successful Response

- MigratedFileUploadResponse — The rows one `POST /internal/files/migrate` created.
  - `file_id` string, uuid, required
  - `upload_id` string, uuid, required
  - `project_id` string, uuid, nullable, required
  - `preview_available` boolean, required
  - `download_only` boolean, required

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-04** `816d6dca5096` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/kobaltlabs/apis/fastapi/changes/internal/files/migrate/post.md)

---

[API](https://skmtc.dev/kobaltlabs/apis/fastapi.md) · [All operations](https://skmtc.dev/kobaltlabs/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kobaltlabs/fastapi/revisions/816d6dca5096/schema)
