---
title: "Upload a CSV, Excel, or PDF file to an embed"
method: POST
path: "/v1/embeds/{embed_id}/upload"
tags: ["Headless Importer"]
---

# Upload a CSV, Excel, or PDF file to an embed

`POST /v1/embeds/{embed_id}/upload`

## Request

- Base URL: `https://api.oneschema.co`
- URL: `https://api.oneschema.co/v1/embeds/{embed_id}/upload`
- Auth: API key in header `X-API-KEY`

Upload a CSV (.csv), Excel (.xlsx), or PDF (.pdf) file into OneSchema. PDF uploads are accepted when PDF extraction is enabled for the embed's organization. An embed must be in the `initialized` state to support an upload, and an embed is returned in one of the following states: `uploaded`, `headers_set`, or `columns_mapped`.

## Path parameters

- `embed_id` integer, required

## Request body `multipart/form-data`

- UploadFileRequest
  - `file` string, binary, required: The contents of the file to be imported.
  - `sheet_name` string: The name of the sheet that should be imported if you are uploading a spreadsheet with multiple tabs.

## Response `200`

200

- EmbedUploadResponse
  - `id` integer
  - `token` string
  - `status` string
  - `user_jwt` string

## Other responses

- `422`: 422

---

[API](https://skmtc.dev/oneschema/apis/importer-embeds.md) - [All operations](https://skmtc.dev/oneschema/apis/importer-embeds/llms.txt) - [OpenAPI document](https://skmtc.dev/oneschema/apis/importer-embeds/revisions/b00b6b778c45?raw)
