---
title: "Create an application from a reviewed plan option"
method: POST
path: "/platform/deployments/custom/plans/{plan_id}/deploy"
tags: ["Platform"]
---

# Create an application from a reviewed plan option

`POST /platform/deployments/custom/plans/{plan_id}/deploy`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/deployments/custom/plans/{plan_id}/deploy`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Deploy scope. Rechecks expiry, rules, actual source SHA256, account ownership and online agent heartbeat within 90 seconds, then normal deployment gates. Explicit memory above reported total is refused. Source/build settings come only from the saved option; runtime settings are chosen now. Reusable plans are not idempotency keys. Each successful call creates an app; check app status before retrying uncertain responses. App metadata includes creation project_plan provenance. No capacity reservation, build-success guarantee or artifact promotion.

## Request body

- object
  - `option_index` integer, required
  - `name` string, required: Per-account-unique deploy name (3-100 chars, [a-z0-9_-]).
  - `agent_id` string, required: Target VPS agent_id (from impreza_list_servers).
  - `domain` string: Public hostname. Omit when onion:true for onion-only.
  - `vars` object: Environment variables to inject into the container.
  - `cpus` number: CPU limit (cores; 1.0 = one core). Default 1.0.
  - `memory_mb` number: Memory limit in MB. Default 512.
  - `target_port` number: Port the container listens on (default 80).
  - `volumes` string[]: Absolute container paths to persist as named Docker volumes (data survives redeploys), e.g. ["/var/lib/app/data","/app/uploads"]. Ignored for mode=manifest (declare volumes in your compose).
  - `onion` boolean: Also publish a Tor v3 hidden service. Default false.
  - `healthcheck_path` string: node_npm, python_pip or php_composer only. Optional HTTP path such as /health (200 ASCII characters max). Checks 127.0.0.1 on target_port and requires 2xx without redirects. Omit for /: Python/PHP require 2xx; legacy Node accepts status below 500. Saved at creation; previews and redeploys retain it. A failed replacement recovers a verified healthy previous release; first installs keep the agent startup warning policy.
  - `tor_egress` boolean: Opt-in custom image/source runtime through Tor SOCKS5h. Requires agent 0.6.20+, local MCP 0.42.0+, tor-egress-v1 and Docker 28+. The application must use the Tor SOCKS5h proxy; existing servers require an explicit agent update. No direct fallback; builds/source retrieval are not anonymized. Imported manifests, catalog installs and external service bindings are unsupported.
  - `require_healthy_start` boolean: node_npm, python_pip or php_composer only. Require an explicit healthcheck_path to become healthy before deployment succeeds, including the first install. Requires agent 0.6.3+. Failed first installs remove containers and preserve volumes; eligible previous releases recover. Omit or false keeps legacy behavior. Saved at creation and inherited by previews/redeploys.
  - `startup_timeout_seconds` integer: Required healthy start only: startup observation budget in seconds, default 60. Separate from source/build and recovery time.

## Response `201`

Success envelope containing the new custom application and project_plan provenance. Follow its deployment status/readiness.

## Other responses

- `400`: Invalid option or runtime fields; source/build overrides refused.
- `404`: Plan or agent not found on this account.
- `409`: Plan/source unavailable, rules changed, source integrity mismatch or target unavailable.

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
