---
title: "Submit compose file update"
method: POST
path: "/api/v1/cvms/{cvm_id}/compose_file"
tags: ["CVMs"]
---

# Submit compose file update

`POST /api/v1/cvms/{cvm_id}/compose_file`

Submit complete compose file with hash verification. Use when you have pre-computed compose_hash and want to skip provision step.

## Path parameters

- `cvm_id` string, required

## Request body

- ComposeFileUpdateRequest — API request model for updating CVM compose files
  - `compose_file` AppComposeV2, required
    - `allowed_envs` string[]
    - `bash_script` string, nullable
    - `default_gateway_domain` string, nullable
    - `docker_compose_file` string, nullable
    - `init_script` string, nullable
    - `kms_enabled` boolean
    - `local_key_provider_enabled` boolean
    - `manifest_version` integer
    - `name` string, required
    - `no_instance_id` boolean
    - `pre_launch_script` string, nullable
    - `public_logs` boolean
    - `public_sysinfo` boolean
    - `public_tcbinfo` boolean
    - `runner` string
    - `gateway_enabled` boolean
    - `features` string[]
    - `salt` string, nullable
    - `secure_time` boolean
    - `storage_fs` union
      - 'ext4'
      - 'zfs'
    - `tproxy_enabled` boolean
  - `compose_hash` string, required
  - `encrypted_env` string, nullable
  - `env_keys` string[], nullable

## Response `202`

Update initiated

- unknown

## Other responses

- `400` — Invalid CVM or hash mismatch
- `401` — Authentication required
- `403` — CVM not in workspace
- `404` — CVM not found
- `422` — Invalid Docker Compose syntax
- `503` — Node under maintenance

---

[API](https://skmtc.net/phala/apis/phala-cloud-api.md) · [All operations](https://skmtc.net/phala/apis/phala-cloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phala/phala-cloud-api/versions/83c6ae62e860/schema)
