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

# Patch apiv1vm state



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/vm/{vm_id}/state
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/{vm_id}/state:
    patch:
      tags:
        - vm
      operationId: update_vm_state
      parameters:
        - name: vm_id
          in: path
          description: VM ID
          required: true
          schema:
            type: string
            format: uuid
        - name: skip_wait_boot
          in: query
          description: >-
            If true, error immediately if the VM is not finished booting.
            Defaults to false
          required: false
          schema:
            type: boolean
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VmUpdateStateRequest'
        required: true
      responses:
        '200':
          description: VM state updated successfully
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: VM not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    VmUpdateStateRequest:
      type: object
      description: Request body for PATCH /api/vm/{vm_id}/state
      required:
        - state
      properties:
        state:
          $ref: '#/components/schemas/VmUpdateStateEnum'
          description: The requested state for the VM
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Reason of error
        success:
          type: boolean
          description: 'Is always: false'
    VmUpdateStateEnum:
      type: string
      description: Possible options for the state requested in PATCH /api/vm/{vm_id}/state
      enum:
        - Paused
        - Running
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````