---
title: "Upload file or create folder."
method: POST
path: "/api/files/{target}"
---

# Upload file or create folder.

`POST /api/files/{target}`

## Response `201`

No error

- union
  - FileUploaded
    - `done` boolean
    - `files` object
      - `local` object
        - `name` string
        - `origin` string
        - `path` string
        - `refs` object
          - `resource` string
          - `download` string
  - FolderCreated
    - `done` boolean
    - `folder` object
      - `name` string
      - `origin` string
      - `path` string
      - `refs` object
        - `resource` string

## Other responses

- `400` — Bad Request
- `403` — Unauthorized
- `409` — Conflict
- `415` — Unsupported Media Type
- `500` — Internal Server Error

## Changes

- **2021-09-23** `7ad880a6c0c4` — 30 info
  - the response property `text` became required for the status `400`
  - the response property `text` became required for the status `403`
  - the response property `text` became required for the status `409`
  - the response property `text` became required for the status `415`
  - …26 more
- **2021-02-22** `30eda14983ed` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/prusa3d/apis/prusalink-web/changes/api/files/:target/post.md)

---

[API](https://skmtc.dev/prusa3d/apis/prusalink-web.md) · [All operations](https://skmtc.dev/prusa3d/apis/prusalink-web/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/prusa3d/prusalink-web/revisions/ebdce30f1db8/schema)
