---
title: "Upload a CSV or Excel file"
method: POST
path: "/v1/sheets"
tags: ["Sheets"]
---

# Upload a CSV or Excel file

`POST /v1/sheets`

Upload a CSV (.csv) or Excel (.xlsx) file into OneSchema.
The file should be sent as `multipart/form-data` and include the filename and the file's media type.

If no `embed_id` is provided, the file is uploaded into the Workspaces product. Without a `workspace_id`, it goes into your default team workspace; pass a `workspace_id` to target a specific workspace. Provide `embed_id` only when you want to import the file into a specific Embed instead.

## Query parameters

- `sheet_name` string
- `workspace_id` integer
- `embed_id` integer

## Response `200`

The request has succeeded.

- UploadFileResponse
  - `sheets` SheetResource[]
    - `id` integer, required — The unique identifier of the sheet.
    - `workspace_id` integer, required — The id of the Workspace that contains the sheet.
    - `name` string, required — The name of the sheet.
    - `template_key` string, nullable — The unique key of the template assigned to the sheet, if any.
    - `custom_metadata` object, nullable — Custom metadata associated with the sheet.
    - `columns` SheetColumn[] — The columns of the sheet, included when the sheet's headers have been set.
      - `id` integer, required — The unique identifier of the column.
      - `name` string, required — The label of the column.
      - `template_column_key` string, nullable — The key of the template column this sheet column is mapped to, if any.
      - `is_custom` boolean — Whether the column is a custom column not present in the assigned template.

## Other responses

- `400` — 400

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/versions/40674aa6d4d9/schema)
