---
title: "List Migrated Files"
method: GET
path: "/internal/files/migrated"
tags: ["internal"]
---

# List Migrated Files

`GET /internal/files/migrated`

Migrated uploads and how the import is going.

Oldest first, so paging through with `POST /files/migrated/process` drains the import in
the order it was loaded. `pending_only` narrows the page to the rows still owed a batch;
`counts` is always the whole import, since it is what says how much of it is left.

## Query parameters

- `company_id` string, uuid, nullable
- `pending_only` boolean
- `limit` integer

## Response `200`

Successful Response

- MigratedFilesResponse
  - `items` MigratedFileResponse[], required
    - `file_id` string, uuid, required
    - `upload_id` string, uuid, required
    - `company_id` string, uuid, required
    - `company_name` string, nullable, required
    - `vendor_id` string, uuid, nullable, required
    - `vendor_name` string, nullable, required
    - `project_id` string, uuid, nullable, required
    - `filename` string, nullable, required
    - `file_type` string, required
    - `file_status` 'deleted' | 'archived' | 'in_use' | 'download_only', required
    - `status` 'processing' | 'deleted' | 'in_use' | 'in_progress' | 'failed' | 'processing_skipped', required
    - `embed_state` 'COMPLETED' | 'IN_PROGRESS' | 'NOT_STARTED' | 'FAILED' | 'NOT_SUPPORTED' | 'CLEANUP_IN_PROGRESS', required
    - `outcome` 'pending' | 'processing' | 'succeeded' | 'failed' | 'download_only', required — What has actually become of a bulk-imported upload's deferred processing. `FileVersions.migrated` says only that a row came in off another system; where its processing stands is on `status`, `embed_state` and the parent `Files.status`, exactly where an ordinary upload's is. This folds those into the one question an operator draining an import asks of a row, so the queue screen and its totals cannot answer it two different ways. Lowercase because it is derived for responses and never stored, so no ENUM type has to agree with it.
    - `failure_reason` string, nullable, required
    - `num_pages` integer, nullable, required
    - `uploaded_at` string, date-time, required
  - `counts` MigratedFileCounts, required — How the whole (optionally company-filtered) import splits by outcome. Whole-set totals rather than a tally of the returned page: an operator batching through an import needs to know how much is left, and the page is capped by `limit`.
    - `pending` integer, required
    - `processing` integer, required
    - `succeeded` integer, required
    - `failed` integer, required
    - `download_only` integer, required
    - `total` integer, 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/migrated/get.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)
