---
title: "Deploy an application."
method: GET
path: "/WebApp/deploy"
tags: ["WebApp", "Web Apps"]
---

# Deploy an application.

`GET /WebApp/deploy`

Web Apps is the recommended feature for deploying new web applications; prefer it over the older Application Manager (`PassengerApps`) feature for new deployments.

This function deploys an application: it installs dependencies, runs
the build, and promotes the result to the live environment.

**Note**:

  This function starts an asynchronous task and returns immediately.
  Stream the returned `sse_url` for live progress, or poll the task.
  While the task runs, the application's status is `deploying`. When
  the task finishes the status transitions to `running` on success or
  `errored` on failure. Use `WebApp::list` to read the current status
  and inspect `last_deploy` for the outcome and any failure category.

**Important**:

  This function is idempotent. If you call it while a deploy for the
  same application is already running, it returns the in-flight
  task's identifiers instead of starting a new deploy.

If this call fails before the task is dispatched (for example, when
the application does not exist), `metadata.error_category` carries a
machine-readable failure category. Build and runtime failures occur
inside the background task and are recorded asynchronously in
`last_deploy.error_category`, which is accessible via `WebApp::list`.

## Query parameters

- `name` string, required

## Response `200`

HTTP Request was successful.

- object
  - `apiversion` integer — The version of the API.
  - `func` string — The name of the method called.
  - `module` string — The name of the module called.
  - `result` object
    - `data` object
      - `deploy_id` string — The unique identifier of this deploy.
      - `sse_url` string, url-path — The SSE URL to stream the deploy's progress.
      - `task_id` string — The task id of the SSE process.
    - `errors` string[], nullable — List of errors if the API failed.
    - `messages` string[], nullable — List of messages generated by the API.
    - `metadata` object
      - `error_category` 'build_failed' | 'port_conflict' | 'requires_build' | 'start_failed' | 'limit_exceeded' | 'domain_in_use', nullable — The machine-readable failure category. Only present when `status` is `0` and the error occurred before the background task was dispatched. Build and runtime pipeline failures occur asynchronously; they are recorded in `last_deploy.error_category` after the task finishes and are accessible via `WebApp::list`. * `build_failed` — The build step failed. The error message includes the breached resource cap when one applied. * `port_conflict` — The application's port is already in use. * `requires_build` — The application must be built before it can deploy, and no build command is configured. * `start_failed` — The container started but is not listening on a port, so the application is unreachable; it most likely exited immediately. * `limit_exceeded` — Deploying this application would push the account's number of running application containers to or past its maximum allowed applications. * `domain_in_use` — Another of this account's applications has claimed the application's domain since it was last configured.
    - `status` 0 | 1 — - `1` - Success. - `0` - Failed. Check the `errors` field for more details.
    - `warnings` string[], nullable — List of warnings generated by the API. Warnings describe non-critical failures or other problematic conditions noted while running a API.

---

[API](https://skmtc.net/cpanel/apis/cpanel-uapi.md) · [All operations](https://skmtc.net/cpanel/apis/cpanel-uapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cpanel/cpanel-uapi/versions/632e2f8e6d04/schema)
