---
title: "Prepare Upload for Deployment"
method: POST
path: "/v2/upload/{upload_id}/prepare"
tags: ["Upload", "Deployment"]
---

# Prepare Upload for Deployment

`POST /v2/upload/{upload_id}/prepare`

Prepares an uploaded file for deployment, either as a new project or to an existing service

## Path parameters

- `upload_id` string, required

## Request body

- union
  - NewProjectPrepareRequest
    - `upload_type` 'new_project', required — Indicates that this upload is for a new project
  - ExistingServicePrepareRequest
    - `upload_type` 'existing_service', required — Indicates that this upload is for an existing service
    - `service_id` string, required — ID of the service to deploy to
    - `environment_id` string, required — ID of the environment for the deployment

## Response `200`

Upload prepared successfully

- union
  - NewProjectPrepareResponse
    - `url` string, required — URL to access the new project
  - ExistingServicePrepareResponse
    - `url` string, required — URL to access the service deployment

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Resource not found
- `500` — Server error

## Changes

- **2026-07-17** `31b26ce3df6c` — 1 info
  - the endpoint scheme security `bearerAuth` was added to the API
- **2025-03-19** `48befbc5a986` — 1 info
  - the endpoint scheme security `bearerAuth` was removed from the API

[Change history](https://skmtc.dev/zeabur/apis/zeabur-upload-api/changes/v2/upload/:upload_id/prepare/post.md)

---

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