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

# Create a new branch.



## OpenAPI

````yaml api-reference/openapi.json post /api/branches
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/branches:
    post:
      tags:
        - Branches
      summary: Create a new branch.
      operationId: BranchesController_createBranch
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBranchDto'
      responses:
        '200':
          description: The branch has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchResponseDto'
        '404':
          description: The branch not found.
components:
  schemas:
    CreateBranchDto:
      type: object
      properties:
        name:
          type: string
          description: Branch name
          example: Main Branch
        primary:
          type: boolean
          description: Whether this is the primary branch
          example: true
          default: false
        code:
          type: string
          description: Branch code
          example: BR001
        address:
          type: string
          description: Branch address
          example: 123 Main Street
        city:
          type: string
          description: Branch city
          example: New York
        country:
          type: string
          description: Branch country
          example: USA
        phone_number:
          type: string
          description: Branch phone number
          example: +1-555-123-4567
        email:
          type: string
          description: Branch email
          example: branch@example.com
        website:
          type: string
          description: Branch website
          example: https://www.example.com/branch
      required:
        - name
    BranchResponseDto:
      type: object
      properties:
        id:
          type: number
          description: Branch ID
          example: 1
        name:
          type: string
          description: Branch name
          example: Main Branch
        code:
          type: string
          description: Branch code
          example: BR001
        address:
          type: string
          description: Branch address
          example: 123 Main Street
        city:
          type: string
          description: Branch city
          example: New York
        country:
          type: string
          description: Branch country
          example: USA
        phoneNumber:
          type: string
          description: Branch phone number
          example: +1-555-123-4567
        email:
          type: string
          description: Branch email
          example: branch@example.com
        website:
          type: string
          description: Branch website
          example: https://www.example.com/branch
        primary:
          type: boolean
          description: Whether this is the primary branch
          example: true
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
          example: '2024-03-20T10:00:00Z'
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
          example: '2024-03-20T10:00:00Z'
      required:
        - id
        - name
        - code
        - address
        - city
        - country
        - phoneNumber
        - email
        - website
        - primary
        - createdAt
        - updatedAt

````