> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phala.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit compose file update

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



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/{cvm_id}/compose_file
openapi: 3.1.0
info:
  title: Phala Cloud API
  version: 0.1.0
servers:
  - url: https://cloud-api.phala.com
security: []
tags:
  - name: CVMs
    description: Confidential Virtual Machine (CVM) lifecycle management on Phala Network
  - name: Apps
    description: App template management and CVM deployment from app blueprints
  - name: Webhooks
    description: Manage webhook endpoints and monitor delivery history
  - name: SSH Keys
    description: SSH public key management for CVM access
  - name: KMS
    description: >-
      Key Management Service — key derivation, on-chain anchoring, and
      inspection
  - name: Instance Types
    description: Available hardware configurations for CVM deployment
  - name: Attestations
    description: Remote attestation and TEE verification endpoints
paths:
  /api/v1/cvms/{cvm_id}/compose_file:
    post:
      tags:
        - CVMs
      summary: Submit compose file update
      description: >-
        Submit complete compose file with hash verification. Use when you have
        pre-computed compose_hash and want to skip provision step.
      operationId: submit_cvm_compose_file_update_api_v1_cvms__cvm_id__compose_file_post
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ComposeFileUpdateRequest'
              description: Complete compose file with hash
      responses:
        '202':
          description: Update initiated
          content:
            application/json:
              schema: {}
        '400':
          description: Invalid CVM or hash mismatch
        '401':
          description: Authentication required
        '403':
          description: CVM not in workspace
        '404':
          description: CVM not found
        '422':
          description: Invalid Docker Compose syntax
        '503':
          description: Node under maintenance
components:
  schemas:
    ComposeFileUpdateRequest:
      properties:
        compose_file:
          $ref: '#/components/schemas/AppComposeV2'
        compose_hash:
          type: string
          title: Compose Hash
        encrypted_env:
          anyOf:
            - type: string
            - type: 'null'
          title: Encrypted Env
        env_keys:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Env Keys
      type: object
      required:
        - compose_file
        - compose_hash
      title: ComposeFileUpdateRequest
      description: API request model for updating CVM compose files
    AppComposeV2:
      properties:
        allowed_envs:
          items:
            type: string
          type: array
          title: Allowed Envs
        bash_script:
          anyOf:
            - type: string
            - type: 'null'
          title: Bash Script
        default_gateway_domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Gateway Domain
        docker_compose_file:
          anyOf:
            - type: string
            - type: 'null'
          title: Docker Compose File
        init_script:
          anyOf:
            - type: string
            - type: 'null'
          title: Init Script
        kms_enabled:
          type: boolean
          title: Kms Enabled
          default: true
        local_key_provider_enabled:
          type: boolean
          title: Local Key Provider Enabled
          default: false
        manifest_version:
          type: integer
          title: Manifest Version
          default: 2
        name:
          type: string
          title: Name
        no_instance_id:
          type: boolean
          title: No Instance Id
          default: false
        pre_launch_script:
          anyOf:
            - type: string
            - type: 'null'
          title: Pre Launch Script
        public_logs:
          type: boolean
          title: Public Logs
          default: true
        public_sysinfo:
          type: boolean
          title: Public Sysinfo
          default: true
        public_tcbinfo:
          type: boolean
          title: Public Tcbinfo
          default: true
        runner:
          type: string
          title: Runner
          default: docker-compose
        gateway_enabled:
          type: boolean
          title: Gateway Enabled
          default: true
        features:
          items:
            type: string
          type: array
          title: Features
          default:
            - kms
            - tproxy-net
        salt:
          anyOf:
            - type: string
            - type: 'null'
          title: Salt
        secure_time:
          type: boolean
          title: Secure Time
          default: false
        storage_fs:
          anyOf:
            - type: string
              const: ext4
            - type: string
              const: zfs
            - type: 'null'
          title: Storage Fs
          default: zfs
        tproxy_enabled:
          type: boolean
          title: Tproxy Enabled
          default: true
      type: object
      required:
        - name
      title: AppComposeV2

````