---
title: "Create a file upload URL"
method: POST
path: "/api/v1/w/{wId}/files"
tags: ["Conversations"]
---

# Create a file upload URL

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

## Path parameters

- `wId` string, required

## Request body

- object
  - `contentType` string, required — MIME type of the file
  - `fileName` string, required — Name of the file
  - `fileSize` integer, required — Size of the file in bytes
  - `useCase` string, required — Intended use case for the file, use "conversation"
  - `useCaseMetadata` string, required — (optional) Metadata for the use case, for conversation useCase should be dictionary with conversationId stringified

## Response `200`

File upload URL created successfully

- object
  - `file` object
    - `sId` string — Unique string identifier for the file
    - `uploadUrl` string — Upload URL for the file

## Other responses

- `400` — Invalid request or unsupported file type
- `401` — Unauthorized
- `429` — Rate limit exceeded

---

[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)
