---
title: "Upload a File"
method: POST
path: "/v1/datalake/upload"
tags: ["Files"]
---

# Upload a File

`POST /v1/datalake/upload`

This endpoint uploads a file to the Data Lake.
The maximum upload request size is 200 MB.

## Headers

- `ts-auth-token` string
- `x-org-slug` string

## Request body

- object
  - `file` string, binary
  - `filename` string — Name of the file
  - `meta` string, json — (optional) key-value fields for the file. Example: `{"foo":"bar"}`
  - `tags` string[] — (optional) tags you want to attach to this file. Example `["tag1","tag2"]`
  - `sourceFileId` string — (optional) "fileId" of the file you want to replace
  - `sourceType` string — (optional) "type" of the file you want to replace
  - `path` string — (optional) The target folder path in the Data Lake where the file should be uploaded. If not specified, the file is uploaded to the root folder.
  - `labels` object[] — (optional) array of labels to attach to this file. e.g. `[{"name":"test-name","value":"test-value"}]`
    - `name` string, required — Name of the label
    - `value` string, required — Value of the label

## Response `200`

200

## Other responses

- `400` — 400

---

[API](https://skmtc.net/tetrascience/apis/tetra-data-lake.md) · [All operations](https://skmtc.net/tetrascience/apis/tetra-data-lake/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tetrascience/tetra-data-lake/revisions/0205e2bace53/schema)
