---
title: "Preview Upload"
method: POST
path: "/api/codex-schema/preview-upload"
tags: ["codex-schema"]
---

# Preview Upload

`POST /api/codex-schema/preview-upload`

Parse an uploaded spreadsheet server-side and return headers, sample rows, and schema signature.

## Query parameters

- `user_id` string, nullable
- `org_id` string, nullable

## Request body

- PreviewUploadRequest
  - `storage_name` string, required — Storage path of the uploaded file in agent-uploads bucket.
  - `original_filename` string, required — Original filename for type detection.
  - `sheet_name` string, nullable — Sheet to preview when workbook has multiple sheets.

## Response `200`

Successful Response

- PreviewUploadResponse
  - `file_type` string, required
  - `available_sheets` SheetInfo[], nullable
    - `name` string, required
    - `row_count` integer, required
  - `selected_sheet` string, nullable
  - `headers` string[], required
  - `sample_rows` object[], required
  - `total_rows` integer, required
  - `schema_signature` string, required
  - `schema_version` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/every/apis/every-api.md) · [All operations](https://skmtc.net/every/apis/every-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/every/every-api/versions/9744001af85d/schema)
