---
title: "Replace an upload's data"
method: PUT
path: "/api/v1/uploads/{uploadId}"
tags: ["Uploads"]
---

# Replace an upload's data

`PUT /api/v1/uploads/{uploadId}`

Replace the data behind an existing CSV upload while keeping its id stable. The new file lands as fresh storage and (when the connection stages uploads) a fresh warehouse table, and the upload's pointers move to them — views and document tabs reference the upload by id, so they serve the new data with no model or document changes. Column renames/removals may break content referencing the old columns.

## Path parameters

- `uploadId` string, uuid, required — ID of the upload to delete

## Response `200`

Upload data replaced successfully

- UploadPutResponse
  - `fileName` string, required — File name of the replacement upload
  - `id` string, uuid, required — The upload id — unchanged by the data swap
  - `inDbAsTableName` string, required — Database table name in the scratch schema (empty for S3-only connections)
  - `refreshedModelIds` string[], required — Models whose view of this upload was re-pointed at the new data (the upload's workbook model, or the connection's shared models holding a view backed by this upload)
  - `rowCount` integer, required — Number of rows in the replacement file
  - `truncated` boolean, required — Whether the file was truncated due to row limit
  - `viewName` string, required — View name — unchanged by the data swap

## Other responses

- `400` — Invalid request (missing file, invalid file type, CSV parsing failed, or a non-CSV upload)
- `401` — Authentication required
- `403` — Permission denied
- `404` — Upload not found or already deleted

---

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