---
title: "Upload a file"
method: PUT
path: "/uploads/{owner}/{id}/files/{file}"
tags: ["files"]
---

# Upload a file

`PUT /uploads/{owner}/{id}/files/{file}`

## Request

- Base URL: `https://api.data.world/v0`
- URL: `https://api.data.world/v0/uploads/{owner}/{id}/files/{file}`
- Auth: HTTP bearer

Upload one file at a time to a dataset.

This endpoint expects requests of type `application/octet-stream`.

For example, assuming that you want to upload a local file named `file1.csv` to a hypothetical dataset
`https://data.world/awesome-user/awesome-dataset` and choose its name on data.world to be
`better-name.csv`, this is what the cURL command would look like.

```bash
curl \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -X PUT -H "Content-Type: application/octet-stream" \
  --data-binary @file1.csv \
  https://api.data.world/v0/uploads/awesome-user/awesome-dataset/files/better-name.csv
```

This method of upload is typically not supported by Swagger clients. Other HTTP clients can be used to
supply the contents of the file directly in the body of the request.

## Path parameters

- `owner` string, required
- `id` string, required
- `file` string, required

## Query parameters

- `expandArchive` boolean

## Request body `*/*`

- string, binary

## Response `200`

default response

- SuccessMessage
  - `message` string

## Changes

- **2026-11-03** `a1f78a95dfc1`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/data/apis/data-world-public-api/changes/uploads/:owner/:id/files/:file/put.md)

---

[API](https://skmtc.dev/data/apis/data-world-public-api.md) - [All operations](https://skmtc.dev/data/apis/data-world-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/data/apis/data-world-public-api/revisions/a1f78a95dfc1?raw)
