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

---

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