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

# Create branch



## OpenAPI

````yaml /api-reference/openapi.yaml post /projects/{projectId}/branches
openapi: 3.1.0
info:
  title: Avera API
  version: 1.0.0
  description: >
    Avera ALM/PLM/QMS Platform API for regulated industries.


    ## Authentication

    All endpoints require Bearer token authentication and tenant context
    headers.


    ## Common Headers

    - `X-Tenant-ID`: Required. UUID of the current tenant.

    - `X-Branch-ID`: Required for item operations. UUID of the current branch.

    - `X-Correlation-ID`: Optional. Request correlation ID for tracing.
servers:
  - url: /api/v1
    description: API v1
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Project management operations
  - name: Items
    description: Item (requirement, design, test) operations
  - name: Branches
    description: Branch management for version control
  - name: Schema
    description: Meta-model schema operations
paths:
  /projects/{projectId}/branches:
    post:
      tags:
        - Branches
      summary: Create branch
      operationId: createBranch
      parameters:
        - $ref: '#/components/parameters/projectId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBranchRequest'
      responses:
        '201':
          description: Branch created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Branch'
components:
  parameters:
    projectId:
      name: projectId
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    CreateBranchRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        sourceBranchId:
          type: string
          format: uuid
      required:
        - name
        - sourceBranchId
    Branch:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        type:
          $ref: '#/components/schemas/BranchType'
        status:
          $ref: '#/components/schemas/BranchStatus'
        sourceBranchId:
          type: string
          format: uuid
          nullable: true
        headCommitId:
          type: string
          format: uuid
          nullable: true
        createdAt:
          type: string
          format: date-time
        createdBy:
          type: string
          format: uuid
      required:
        - id
        - projectId
        - name
        - type
        - status
        - createdAt
        - createdBy
    BranchType:
      type: string
      enum:
        - MAIN
        - FEATURE
        - RELEASE
        - HOTFIX
    BranchStatus:
      type: string
      enum:
        - ACTIVE
        - MERGED
        - CLOSED
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````