---
title: "Initiate Assembly Upload"
method: POST
path: "/api/v1/projects/{project_id}/assembly-file/initiate-upload"
tags: ["assembly-files"]
---

# Initiate Assembly Upload

`POST /api/v1/projects/{project_id}/assembly-file/initiate-upload`

Initiate an assembly file upload — returns the R2 key.

Hard-replaces any existing assembly file for the project (deletes the
old R2 object + DB row before creating the new row). The client then
streams the file to ``POST /upload`` and finally calls confirm-upload.

Returns 409 ``ASSEMBLY_UPLOAD_BLOCKED_BY_STATUS`` if the project is
past IN_PRODUCTION.

## Path parameters

- `project_id` string, uuid, required

## Request body

- InitiateAssemblyUploadRequest — Request body to obtain a presigned R2 upload URL for an assembly file. Hard-replace semantics: if the project already has an assembly file, the existing R2 object + DB row are deleted as part of this call.
  - `file_name` string, required — Original file name including extension (e.g. 'main_assembly.step').
  - `content_type` string, required — MIME type of the file (e.g. 'application/octet-stream').
  - `file_size` integer, required — Exact file size in bytes. Must not exceed 50 MB.

## Response `200`

Successful Response

- InitiateAssemblyUploadResponse — Response from the initiate-upload endpoint. The client streams the raw file bytes to the proxy upload endpoint ``POST /projects/{project_id}/assembly-file/upload`` and then calls confirm-upload with ``assembly_file_id`` and ``r2_key``.
  - `assembly_file_id` string, uuid, required
  - `r2_key` string, required

## Other responses

- `422` — Validation Error

---

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