---
title: "Deploy app"
method: POST
path: "/apps/{name}/deploy"
---

# Deploy app

`POST /apps/{name}/deploy`

Deploy a new version of an app. Accepts either a TAR file upload (application/tar) or a JSON body with source_uri (application/json) for deploying from a GitHub repository.

## Path parameters

- `name` string, required — The name of the app to deploy.

## Query parameters

- `environment` string — The environment to deploy to.
- `all_environments` boolean — Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.

## Headers

- `X-Tower-Checksum-SHA256` string — The SHA256 hash of the content, used to verify integrity.
- `X-Tower-Idempotency-Key` string — Optional opaque key (typically a git commit SHA or CI build ID). If a prior deploy for this app supplied the same value, the server reuses that AppVersion instead of creating a new one — letting consecutive deploys to different environments share a single version when the source hasn't changed.
- `X-Tower-Request-Number` integer — Optional account-scoped monotonic sequence token used to reject out-of-order writes. See the fence documentation for the acceptance window and retry behavior.
- `Content-Length` integer — Size of the uploaded bundle in bytes.

## Request body

- object
  - `source_uri` string, uri, required — GitHub repository URL for deploying from source

## Response `201`

Created

- DeployAppResponse
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `version` AppVersion, required
    - `content_checksum` string — Server-computed SHA256 of the bundle contents for this version.
    - `created_at` string, date-time, required
    - `idempotency_key` string — Client-supplied key (e.g. git SHA) that produced this version, or empty if none was supplied at deploy time.
    - `parameters` Parameter[], required
      - `default` string, required
      - `description` string, required
      - `hidden` boolean — Whether this parameter is hidden/secret. Defaults to false.
      - `name` string, required
    - `towerfile` string, required — The Towerfile that this version was created from.
    - `version` string, required

## Other responses

- `400` — Bad Request
- `412` — Precondition Failed
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

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