---
title: "Preview Dataset File Upload"
method: POST
path: "/ingest/upload"
tags: ["Ingest"]
---

# Preview Dataset File Upload

`POST /ingest/upload`

## Request

- Base URL: `https://synchronex.ai/api/v1`
- URL: `https://synchronex.ai/api/v1/ingest/upload`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://synchronex.ai/oauth/authorize`, token URL `https://synchronex.ai/api/oauth/token`, scopes: `read`)

Accepts a CSV or XLSX file using a hashed `sx_ingest_*` key, infers schema, and returns sample rows. No database rows are written until `/ingest/upload/confirm` is called.

## Response `200`

Upload parsed and ready for confirmation.

- IngestUploadPreviewResponse
  - `success` boolean, required
  - `upload_id` string, uuid, required
  - `dataset_name` string, required
  - `row_count` integer, required
  - `inferred_schema` object, required
  - `sample_rows` object[], required
  - `expires_at` string, date-time

## Other responses

- `400`: Validation error. The request body or query string is invalid.
- `401`: Unauthorized. Missing, malformed, expired, or revoked bearer token.
- `403`: Forbidden. The token scope or account tier is insufficient.
- `422`: Semantic validation failed.
- `429`: Rate limit exceeded. Retry after the indicated reset time.
- `500`: Internal server error.

---

[API](https://skmtc.dev/synchronex/apis/synchronex-api.md) · [All operations](https://skmtc.dev/synchronex/apis/synchronex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/synchronex/apis/synchronex-api/revisions/aa1e0df0a8d5?raw)
