---
title: "Get Files Health"
method: GET
path: "/internal/files/health"
tags: ["internal"]
---

# Get Files Health

`GET /internal/files/health`

Return FileVersions rows that are stuck in processing or have
failed / not-started embedding, for active companies only.

## Query parameters

- `processing_age_minutes` integer

## 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/425d5b8a3c17/schema)
