---
title: "Upload File"
method: PUT
path: "/api/v1/files/{file_path}"
tags: ["files"]
---

# Upload File

`PUT /api/v1/files/{file_path}`

Upload a file (max. 5 GB) to the specified path.

- Specify the `Content-Type` header for accurate file type handling.
- If `Content-Type` is omitted, the system will attempt to infer it.
- For workspace-specific uploads, use path: `workspaces/{workspace_id}/...`
- If a file with the same file path already exists, it will be overwritten.
- If there are unsupported characters in the file path, they will be removed or replaced.
- If the file path is longer than `1024` characters, the file path will be shortened starting from the end.
- Set `strict=true` to fail the request if the file path would be modified during sanitization (e.g., if the file path contains unsupported characters or is too long).

## Path parameters

- `file_path` string, required

## Query parameters

- `strict` boolean

## Response `201`

File uploaded successfully

- UploadFileResponse
  - `filePath` string, required
  - `contentType` string, required

## Other responses

- `401` — Unauthorized
- `403` — Permission denied
- `413` — File too large (max. 5 GB)
- `422` — File path contains invalid characters or exceeds maximum length
- `500` — Internal server error

---

[API](https://skmtc.dev/askui/apis/askui-workspaces-api.md) · [All operations](https://skmtc.dev/askui/apis/askui-workspaces-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/askui/askui-workspaces-api/revisions/b796c74292ac/schema)
