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

# List Repository Branches

> List branches for a repository.



## OpenAPI

````yaml /openapi.json get /api/github/repositories/{owner}/{repo}/branches
openapi: 3.1.0
info:
  description: >-
    Public CodeCobra API. Authenticate by sending a personal API key in the
    `Authorization: Bearer <key>` header. Generate keys from Settings → API keys
    in the CodeCobra dashboard.
  title: CodeCobra Public API
  version: 1.0.0
servers: []
security: []
paths:
  /api/github/repositories/{owner}/{repo}/branches:
    get:
      tags:
        - public
      summary: List Repository Branches
      description: List branches for a repository.
      operationId: >-
        list_repository_branches_api_github_repositories__owner___repo__branches_get
      parameters:
        - in: path
          name: owner
          required: true
          schema:
            title: Owner
            type: string
        - in: path
          name: repo
          required: true
          schema:
            title: Repo
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/GitHubBranch'
                title: >-
                  Response List Repository Branches Api Github Repositories 
                  Owner   Repo  Branches Get
                type: array
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    GitHubBranch:
      description: Represents a GitHub branch.
      properties:
        name:
          title: Name
          type: string
        protected:
          title: Protected
          type: boolean
      required:
        - name
        - protected
      title: GitHubBranch
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````