> ## 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.

# Commit CVM replica (token-based, no auth required)

> Completes a two-phase CVM replication using a one-time commit token. The token was generated during a prepare-only or hash-required replica request.



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/{cvm_id}/commit-replica
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}/commit-replica:
    post:
      tags:
        - CVMs
      summary: Commit CVM replica (token-based, no auth required)
      description: >-
        Completes a two-phase CVM replication using a one-time commit token. The
        token was generated during a prepare-only or hash-required replica
        request.
      operationId: commit_cvm_replica_api_v1_cvms__cvm_id__commit_replica_post
      parameters:
        - name: cvm_id
          in: path
          required: true
          schema:
            type: string
            title: Cvm Id
        - name: token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Commit token (alternative to body.token)
            title: Token
          description: Commit token (alternative to body.token)
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitUpdateRequest'
              default:
                token: ''
                compose_hash: ''
                transaction_hash: ''
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CommitUpdateRequest:
      properties:
        token:
          type: string
          title: Token
          description: Commit token (can also be passed as ?token= query param)
          default: ''
        compose_hash:
          type: string
          title: Compose Hash
          description: Compose hash from Phase 1. If omitted, auto-read from commit token.
          default: ''
        transaction_hash:
          type: string
          title: Transaction Hash
          description: >-
            Transaction hash proving on-chain registration. Leave empty or use
            'already-registered' if the hash was already registered on-chain.
          default: ''
      type: object
      title: CommitUpdateRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````