---
title: "Upload file content"
method: POST
path: "/api/w/{wId}/files/{fileId}"
tags: ["Private Files"]
---

# Upload file content

`POST /api/w/{wId}/files/{fileId}`

Process and store the uploaded file content.

## Path parameters

- `wId` string, required
- `fileId` string, required

## Response `200`

File processed successfully

- object
  - `file` PrivateFileWithUploadUrl — File record with a pre-signed upload URL.
    - `sId` string, required
    - `id` string, required
    - `contentType` string, required
    - `fileName` string, required
    - `fileSize` integer, required
    - `version` integer
    - `status` 'created' | 'failed' | 'ready', required
    - `useCase` 'conversation' | 'avatar' | 'tool_output' | 'upsert_document' | 'folders_document' | 'upsert_table' | 'project_context' | 'skill_attachment', required
    - `uploadUrl` string, required — Pre-signed URL for uploading the file content
    - `downloadUrl` string
    - `publicUrl` string
    - `path` string, nullable — path when the file is ready on a mount (e.g. `project/report.pdf` or `conversation/chart.png`). Same shape as mount file listing entries.

## Other responses

- `400` — Invalid file content (e.g. a CSV with an unsupported encoding)
- `403` — Permission denied
- `404` — File not found

---

[API](https://skmtc.net/dust-tt/apis/dust-api-documentation.md) · [All operations](https://skmtc.net/dust-tt/apis/dust-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/dust-tt/dust-api-documentation/versions/5834d690c29d/schema)
