---
title: "Upload File"
method: POST
path: "/v1/files"
tags: ["v1", "protected", "files"]
---

# Upload File

`POST /v1/files`

Upload a file, server-proxied.

``purpose="workspace"`` (the default) lands the file at the workspace
artifact root. ``purpose="attachment"`` stages it under
``staging/{id}/{filename}`` — hidden from the workspace listing — and
returns a ``ref`` the task-create endpoint resolves into the task workspace.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-07-28** `d29cbb0c8cc9` — 1 breaking, 3 info
  - removed the success response with the status `204`
  - api operation id `upload_workspace_file_v1_files_post` removed and replaced with `upload_file_v1_files_post`
  - added the new optional request property `purpose`
  - added the success response with the status `200`
- **2026-07-08** `8940d7f77282` — 1 info
  - endpoint added
- **2026-03-30** `e9c153221160` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/files/post.md)

---

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