---
title: "Create Deployment"
method: POST
path: "/deployments"
tags: ["deployments"]
---

# Create Deployment

`POST /deployments`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/deployments`
- Auth: none declared

## Request body

- DeploymentCreate
  - `cluster_id` string, uuid, required
  - `name` string, required
  - `app_type` 'web_app' | 'api' | 'database' | 'static_site' | 'container' | 'helm'
  - `config` object, nullable
  - `cpu_request` number, nullable
  - `memory_request_mb` integer, nullable
  - `replicas` integer, nullable
  - `container_port` integer, nullable
  - `environment_variables` EnvironmentVariable[], nullable
    - `name` string, required
    - `value` string, nullable
    - `secret_ref` string, nullable
  - `storage_size_gb` integer, nullable
  - `volumes` VolumeConfig[], nullable
    - `path` string, required
    - `sizeGb` integer
    - `purpose` string, nullable
  - `run_as_uid` integer, nullable
  - `docker_image` string, nullable
  - `deployment_type` string
  - `helm_repo_url` string, nullable
  - `helm_chart_name` string, nullable
  - `helm_chart_version` string, nullable
  - `custom_values_yaml` string, nullable
  - `image_update_strategy` string, nullable
  - `image_update_constraint` string, nullable
  - `image_allow_tags` string, nullable
  - `image_ignore_tags` string, nullable
  - `custom_domain` string, nullable
  - `failover_health_route` boolean, nullable
  - `helm_ingress_values` boolean, nullable
  - `health_checks` HealthChecksConfig: Container health check configuration (stored in the deployment config). On update, an empty object clears any overrides and restores automatic detection.
    - `liveness` HealthCheckProbe: One container health check (liveness or readiness probe). All fields except `enabled` are optional: an unset `type` keeps the auto-detected HTTP/TCP choice, an unset `path` keeps the detected endpoint, and unset timings keep the platform defaults.
      - `enabled` boolean
      - `type` 'http' | 'tcp', nullable
      - `path` string, nullable
      - `initial_delay_seconds` integer, nullable
      - `period_seconds` integer, nullable
      - `timeout_seconds` integer, nullable
      - `failure_threshold` integer, nullable
    - `readiness` HealthCheckProbe: One container health check (liveness or readiness probe). All fields except `enabled` are optional: an unset `type` keeps the auto-detected HTTP/TCP choice, an unset `path` keeps the detected endpoint, and unset timings keep the platform defaults.
      - `enabled` boolean
      - `type` 'http' | 'tcp', nullable
      - `path` string, nullable
      - `initial_delay_seconds` integer, nullable
      - `period_seconds` integer, nullable
      - `timeout_seconds` integer, nullable
      - `failure_threshold` integer, nullable
    - `startup` HealthCheckProbe: One container health check (liveness or readiness probe). All fields except `enabled` are optional: an unset `type` keeps the auto-detected HTTP/TCP choice, an unset `path` keeps the detected endpoint, and unset timings keep the platform defaults.
      - `enabled` boolean
      - `type` 'http' | 'tcp', nullable
      - `path` string, nullable
      - `initial_delay_seconds` integer, nullable
      - `period_seconds` integer, nullable
      - `timeout_seconds` integer, nullable
      - `failure_threshold` integer, nullable
  - `additional_ports` AdditionalPort[], nullable
    - `port` integer, required
    - `name` string, nullable
    - `protocol` 'TCP' | 'UDP', nullable
  - `backups` BackupsConfig: Scheduled backup configuration (stored in the deployment config). Backups capture the deployment's namespace: workload configuration, in-namespace secrets, and all persistent volume data. Managed databases are excluded — they have their own backup mechanism. Requires a dedicated cluster and the "backups" feature flag.
    - `enabled` boolean
    - `schedule` 'hourly' | 'daily' | 'weekly'
    - `retention_days` integer
  - `command` string[], nullable
  - `args` string[], nullable

## Response `201`

Successful Response

- DeploymentResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `cluster_id` string, uuid, required
  - `name` string, required
  - `app_type` 'web_app' | 'api' | 'database' | 'static_site' | 'container' | 'helm', required
  - `status` 'pending' | 'provisioning' | 'promoting' | 'running' | 'stopped' | 'failed' | 'error' | 'migrating' | 'deleting', required
  - `config` object, nullable
  - `values_yaml` string, nullable
  - `git_path` string, nullable
  - `endpoint_url` string, nullable
  - `error_message` string, nullable
  - `cpu_request` number, nullable
  - `memory_request_mb` integer, nullable
  - `replicas` integer, nullable
  - `container_port` integer, nullable
  - `storage_size_gb` integer, nullable
  - `command` string[], nullable
  - `args` string[], nullable
  - `deployment_type` string, nullable
  - `helm_repo_url` string, nullable
  - `helm_chart_name` string, nullable
  - `helm_chart_version` string, nullable
  - `custom_values_yaml` string, nullable
  - `image_update_strategy` string, nullable
  - `image_update_constraint` string, nullable
  - `image_allow_tags` string, nullable
  - `image_ignore_tags` string, nullable
  - `is_adopted` boolean
  - `source_namespace` string, nullable
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `provider` string, nullable
  - `region` string, nullable
  - `cluster_status` string, nullable
  - `cluster_error` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `4ae9b375cdbb`: 1 info
  - added the new optional request property `helm_ingress_values`

[Operation history](https://skmtc.dev/mengi/apis/mengi-cloud/changes/deployments/post.md)

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
