---
title: "Magic Upload Initiate"
method: POST
path: "/api/v1/files/upload/{token}/initiate"
tags: ["files"]
---

# Magic Upload Initiate

`POST /api/v1/files/upload/{token}/initiate`

Step 1 of the large-file magic-link upload: hand back a presigned target
the browser uploads the file to **directly** (browser → S3), bypassing the
API task's memory. The link is validated but NOT consumed here.

## Path parameters

- `token` string, required

## Request body

- MagicUploadInitiateRequest — Ask for a presigned direct-to-S3 upload target for a magic-link file.
  - `filename` string, required

## Response `200`

Successful Response

- MagicUploadInitiateResponse — Presigned target the browser POSTs the file to (multipart form). ``fields`` are form fields that MUST be sent (in order, file last) with the upload; ``user_file_id`` is echoed back to ``/finalize`` so the finished S3 object can be matched.
  - `upload_url` string, required
  - `fields` object, required
  - `user_file_id` string, uuid, required
  - `key` string, required

## Other responses

- `422` — Validation Error

---

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