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

# Branch one or more computers from a computer, checkpoint, or tag.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v2/branches
openapi: 3.1.0
info:
  title: Vers API
  description: >-
    REST API for creating, checkpointing, branching, and managing Vers computers
    and projects.
  version: 2.0.0
servers:
  - url: https://api.vers.sh
    description: Vers API
security:
  - bearerAuth: []
tags:
  - name: Computers
    description: Create, inspect, execute commands in, sleep, wake, and delete computers.
  - name: Branches
    description: Branch one or more computers from a live computer, checkpoint, or tag.
  - name: Checkpoints
    description: Capture, inspect, tag, and delete whole-computer checkpoints.
  - name: Projects
    description: >-
      Organize computers into projects with private service networks and grouped
      restores.
  - name: Operations
    description: Inspect and stream status events for asynchronous durable operations.
  - name: Images
    description: >-
      Import and manage custom OCI images, system images, and registry
      artifacts.
  - name: Repositories
    description: Manage checkpoint repositories, tags, and public catalog entries.
  - name: Domains
    description: Register and manage custom domains.
  - name: Environment Variables
    description: Manage account-level environment variables applied to new computers.
  - name: Account & System
    description: Inspect API key identity, usage, and control-plane health.
paths:
  /api/v2/branches:
    post:
      tags:
        - Branches
      summary: Branch one or more computers from a computer, checkpoint, or tag.
      operationId: branch_computers
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BranchComputersRequest'
        required: true
      responses:
        '201':
          description: Computers created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
        '400':
          description: Invalid branch request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: Source or project is outside the caller's scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
        '404':
          description: Source not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
        '409':
          description: Source computer cannot currently be checkpointed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
        '503':
          description: Checkpoint unavailable or insufficient capacity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchComputersResponse'
components:
  schemas:
    BranchComputersRequest:
      type: object
      description: Create one or more computers from a computer or checkpoint source.
      required:
        - source
      properties:
        count:
          type:
            - integer
            - 'null'
          format: int32
          description: Number of computers to create. Defaults to one.
          minimum: 0
        project_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            Create the computers in this project instead of inheriting the
            source project.
        source:
          $ref: '#/components/schemas/BranchSourceRequest'
      additionalProperties: false
    BranchComputersResponse:
      type: object
      description: >-
        Computers created by a branch request.


        A multi-computer request may create a prefix of the requested batch
        before

        encountering an error. In that case the server returns those computers
        and

        the error together, using the error's HTTP status.
      required:
        - computers
      properties:
        computers:
          type: array
          items:
            $ref: '#/components/schemas/BranchedComputerResponse'
        error:
          type:
            - string
            - 'null'
    BranchSourceRequest:
      oneOf:
        - type: object
          required:
            - computer_id
            - type
          properties:
            computer_id:
              type: string
              format: uuid
            keep_paused:
              type: boolean
              description: >-
                Leave the source computer paused after its checkpoint is
                captured.
            skip_wait_boot:
              type: boolean
              description: >-
                Fail rather than waiting when the source computer is still
                booting.
            type:
              type: string
              enum:
                - computer
        - type: object
          required:
            - checkpoint_id
            - type
          properties:
            checkpoint_id:
              type: string
              format: uuid
            type:
              type: string
              enum:
                - checkpoint
        - type: object
          required:
            - tag_name
            - type
          properties:
            tag_name:
              type: string
            type:
              type: string
              enum:
                - checkpoint_tag
        - type: object
          required:
            - repository
            - tag_name
            - type
          properties:
            repository:
              type: string
            tag_name:
              type: string
            type:
              type: string
              enum:
                - repository_tag
        - type: object
          required:
            - organization
            - repository
            - tag_name
            - type
          properties:
            organization:
              type: string
            repository:
              type: string
            tag_name:
              type: string
            type:
              type: string
              enum:
                - public_repository_tag
      description: >-
        The computer or checkpoint reference to branch from.


        Computer sources are first checkpointed, then restored. Checkpoint
        sources

        are restored directly. Repository forks are a separate repository-copy

        operation and are not represented here.
    BranchedComputerResponse:
      type: object
      description: One computer created by a branch request.
      required:
        - computer_id
        - ip
        - volume_backend
      properties:
        computer_id:
          type: string
          format: uuid
        ip:
          type: string
        name:
          type:
            - string
            - 'null'
        volume_backend:
          $ref: '#/components/schemas/VolumeBackend'
    VolumeBackend:
      type: string
      description: |-
        Selects which volume-management backend Chelsea uses for new VMs when no
        per-request override is specified. `CowfsWal` owns all fresh admission;
        `Cowfs` remains readable only for existing legacy records.
      enum:
        - cowfs
        - cowfswal
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key
      description: 'Vers API key (`VERS_API_KEY`) sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.