---
title: "Create deployment"
method: POST
path: "/hosting/deployments"
tags: ["Hosting - Deployments"]
---

# Create deployment

`POST /hosting/deployments`

Create a new deployment for an app or worker

## Request body

- union — Request body schema.
  - object
    - `kind` 'app', required — Discriminator for an app-backed deployment.
    - `appUuid` string, uuid, required — Identifier of the app to deploy.
    - `files` object[], required — Inline source files for the deployment.
      - `path` string, required
      - `content` string, required
  - object
    - `kind` 'worker', required — Discriminator for a worker-backed deployment.
    - `workerUuid` string, uuid, required — Identifier of the worker to deploy.
    - `files` object[], required — Inline source files for the deployment.
      - `path` string, required
      - `content` string, required

## Response `200`

Successful response

- object
  - `deployment` union, required — Created deployment details.
    - object
      - `uuid` string, uuid, required
      - `workspaceUuid` string, uuid, required
      - `sourceS3Path` string, required
      - `bundleS3Path` string, nullable, required
      - `status` 'pending' | 'building' | 'success' | 'error' | 'cancelled', required
      - `buildLogS3Filename` string, nullable, required
      - `errorMessage` string, nullable, required
      - `url` string, required
      - `userUuid` string, uuid, required
      - `promotedAt` string, nullable, required
      - `promotedByUserUuid` string, uuid, nullable, required
      - `finishedAt` string, nullable, required
      - `temporalWorkflowId` string, uuid, required
      - `createdAt` string, required
      - `updatedAt` string, required
      - `kind` 'app', required
      - `appUuid` string, uuid, required
      - `meta` object, required
    - object
      - `uuid` string, uuid, required
      - `workspaceUuid` string, uuid, required
      - `sourceS3Path` string, required
      - `bundleS3Path` string, nullable, required
      - `status` 'pending' | 'building' | 'success' | 'error' | 'cancelled', required
      - `buildLogS3Filename` string, nullable, required
      - `errorMessage` string, nullable, required
      - `url` string, required
      - `userUuid` string, uuid, required
      - `promotedAt` string, nullable, required
      - `promotedByUserUuid` string, uuid, nullable, required
      - `finishedAt` string, nullable, required
      - `temporalWorkflowId` string, uuid, required
      - `createdAt` string, required
      - `updatedAt` string, required
      - `kind` 'worker', required
      - `workerUuid` string, uuid, required
      - `meta` object, required
        - `bundleSha256` string, required
        - `outboundAllowlist` string[], required
        - `kind` 'custom-integration'

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/revisions/1d5a19e01d83/schema)
