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

# Post apiv1vmbranchby ref 



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/vm/branch/by_ref/{repo_name}/{tag_name}
openapi: 3.1.0
info:
  title: Orchestrator Control Plane API
  description: ''
  license:
    name: ''
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/vm/branch/by_ref/{repo_name}/{tag_name}:
    post:
      tags:
        - vm
      operationId: branch_by_ref
      parameters:
        - name: repo_name
          in: path
          description: The repository name
          required: true
          schema:
            type: string
        - name: tag_name
          in: path
          description: The tag name within the repository
          required: true
          schema:
            type: string
        - name: count
          in: query
          description: Number of VMs to branch (optional; default 1)
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
      responses:
        '201':
          description: Branch VM(s) created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
        '404':
          description: Repository or tag not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NewVmsResponse'
      security:
        - bearer_auth: []
components:
  schemas:
    NewVmsResponse:
      type: object
      required:
        - vms
      properties:
        vms:
          type: array
          items:
            $ref: '#/components/schemas/NewVmResponse'
    NewVmResponse:
      type: object
      description: Response body for new VM requests (new_root, from_commit, branch)
      required:
        - vm_id
      properties:
        vm_id:
          type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: Token

````