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

# Batch stop CVMs

> Force stop multiple CVMs at once. Non-admin users can only stop CVMs in their current workspace. Admin users can stop any CVM. Max 50 per request.



## OpenAPI

````yaml /openapi.json post /api/v1/cvms/batch-stop
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/batch-stop:
    post:
      tags:
        - CVMs
      summary: Batch stop CVMs
      description: >-
        Force stop multiple CVMs at once. Non-admin users can only stop CVMs in
        their current workspace. Admin users can stop any CVM. Max 50 per
        request.
      operationId: handle_batch_stop_cvms_api_v1_cvms_batch_stop_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BatchStopRequest'
        required: true
      responses:
        '200':
          description: Batch stop summary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchStopResponse'
        '400':
          description: Invalid request (e.g. too many CVMs)
        '401':
          description: Authentication required
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    BatchStopRequest:
      properties:
        cvm_ids:
          items:
            type: string
          type: array
          maxItems: 50
          title: Cvm Ids
          description: List of CVM hash IDs to stop
      type: object
      required:
        - cvm_ids
      title: BatchStopRequest
      description: Request to batch stop multiple CVMs.
    BatchStopResponse:
      properties:
        total:
          type: integer
          title: Total
          description: Total CVMs requested
        stopped:
          type: integer
          title: Stopped
          description: CVMs successfully scheduled for stop
        skipped:
          type: integer
          title: Skipped
          description: CVMs skipped (in_progress, no vm_uuid, GPU rental managed)
        errors:
          items:
            $ref: '#/components/schemas/BatchStopErrorEntry'
          type: array
          title: Errors
          description: CVMs that failed to stop
      type: object
      required:
        - total
        - stopped
        - skipped
      title: BatchStopResponse
      description: Summary of batch stop operation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BatchStopErrorEntry:
      properties:
        cvm_id:
          type: string
          title: Cvm Id
          description: Hashed CVM ID
        error:
          type: string
          title: Error
          description: Error message
      type: object
      required:
        - cvm_id
        - error
      title: BatchStopErrorEntry
      description: Error detail for a single CVM in batch stop.
    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

````