---
title: "Preview Entity File"
method: GET
path: "/api/v1/entity-files/{file_id}/preview"
tags: ["entity-files"]
---

# Preview Entity File

`GET /api/v1/entity-files/{file_id}/preview`

How to render this file, decided from its BYTES.

`kind: "blob"` — the only payload a client renders natively — is returned
only for magic-verified PDFs and images. Everything unrecognized, including
anything markup-shaped, is `unsupported` and gets a download button.

## Path parameters

- `file_id` string, uuid, required

## Query parameters

- `app_id` string, uuid, nullable
- `embed_host_app_id` string, uuid, nullable
- `sheet` string, nullable

## Response `200`

Successful Response

- EntityFilePreview — Discriminated on `kind`: - "blob" → fetch /download and render natively. `mode` is "pdf" or "image". Returned ONLY for magic-verified bytes. - "sheet" → render `columns` / `rows` as a table. Already parsed server-side, so no client parser is needed. - "unsupported" → offer a download button and render nothing.
  - `kind` 'blob' | 'sheet' | 'unsupported', required
  - `mode` 'pdf' | 'image', nullable
  - `sheets` string[]
  - `active` string, nullable
  - `columns` string[]
  - `rows` array[]
    - string[]
  - `truncated` boolean

## Other responses

- `422` — Validation Error

## Changes

- **2026-08-28** `eed6fb164abd` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/netter/apis/dmi-backend/changes/api/v1/entity-files/:file_id/preview/get.md)

---

[API](https://skmtc.dev/netter/apis/dmi-backend.md) · [All operations](https://skmtc.dev/netter/apis/dmi-backend/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/netter/dmi-backend/revisions/eed6fb164abd/schema)
