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

# Upload File

`POST /v1/workspaces/{workspace}/files`

Upload a file, server-proxied.

``purpose="workspace"`` (the default) lands the file at ``path`` within the
workspace, or at the workspace root under its own name when ``path`` is
omitted. ``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.

## Path parameters

- `workspace` string, required — Slug of the workspace the request acts in

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-26** `d3ad8e1a3681` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/workspaces/:workspace/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.dev/agentarea/apis/agentarea-api/revisions/d3ad8e1a3681?raw)
