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.

post/apps/{name}/deploy

Request

Path parameters

namestring required

The name of the app to deploy.

Query parameters

environmentstring

The environment to deploy to.

all_environmentsboolean

Whether to deploy to all environments for this app. If true, the 'environment' query parameter is ignored.

Headers

X-Tower-Checksum-SHA256string

The SHA256 hash of the content, used to verify integrity.

X-Tower-Idempotency-Keystring

Optional opaque key (typically a git commit SHA or CI build ID). On a key match, a single-environment deploy keeps that environment's currently selected version if it shares the matched version's code bundle; otherwise it reuses the matched version. Deploying to all environments reuses the matched version in every environment. No new version is created on a key match.

X-Tower-Request-Numberinteger

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-Lengthinteger

Size of the uploaded bundle in bytes.

Request body

source_uristring uri required

GitHub repository URL for deploying from source

Example request

{
  "source_uri": "https://github.com/tower/tower-examples/tree/main/01-hello-world"
}

Response

Created

$schemastring uri

A URL to the JSON Schema for this object.

Example response

{
  "$schema": "https://api.tower.dev/v1/schemas/DeployAppResponse.json"
}

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the required property / to the response with the status