---
title: "Get Files By Ids"
method: POST
path: "/internal/files/by-ids"
tags: ["internal"]
---

# Get Files By Ids

`POST /internal/files/by-ids`

Return FileHealthItems for the given UUIDs.

Accepts both IndividualFileUpload upload_ids (returned directly) and
Files file_ids (resolved to the latest IndividualFileUpload).

## Request body

- FilesByIdsRequest
  - `ids` string[], required

## Response `200`

Successful Response

- FilesHealthResponse
  - `items` FileHealthItem[], required
    - `upload_id` string, uuid, required
    - `file_id` string, uuid, required
    - `filename` string, nullable, required
    - `company_id` string, uuid, required
    - `company_name` string, nullable, required
    - `status` 'processing' | 'deleted' | 'in_use' | 'in_progress' | 'failed', required
    - `embed_state` 'COMPLETED' | 'IN_PROGRESS' | 'NOT_STARTED' | 'FAILED' | 'NOT_SUPPORTED' | 'CLEANUP_IN_PROGRESS', required
    - `uploaded_at` string, date-time, required
    - `minutes_since_uploaded` integer, required
    - `reasons` string[], required
    - `ocr_confidence` OcrConfidence, required — OCR confidence metrics captured during file processing. Stored on ``FileVersions.ocr_confidence`` (JSONB) and computed in ``backend.utils.ocr_confidence``. ``avg_confidence`` is the token-weighted mean across the whole file.
      - `avg_confidence` number, nullable, required
      - `pages_processed` integer, required
  - `processing_age_minutes` integer, required

## Other responses

- `422` — Validation Error

---

[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/3ff4c0bd276b/schema)
