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

# List GitHub repo branch suggestions

> Suggests up to 50 branches of the project's linked repository whose names match a prefix.

Use this tool when you need to:
- Autocomplete a branch name for a task or a review on the project
- Check whether a branch exists on the project's repository

Examples:
- GET /projects/{projectID}/github/branch-suggestions?prefix=feat/

Hints:
- projectID is the project's uuid; prefix is required and refused with 422 when blank or not a valid start of a branch name.
- has_more is true when more than the 50 returned branches match; narrow the prefix to see them.
- Use fetchGithubRepoTree instead to list the files of a branch.
- Owners, admins and members of the project's organization; a viewer or billing member is refused with 403 org_role_insufficient and a project the caller cannot see is 404.
- Refused with 400 when the project has no linked repository, 404 when GitHub no longer has it, 409 when the project's GitHub access is disconnected or github_reconnect_required, 502 when GitHub fails to answer and 503 when the integration is disabled.
- An agent host's grant is refused with 403 agent_host_route_not_allowed.



## OpenAPI

````yaml api-reference/openapi.json GET /projects/{projectID}/github/branch-suggestions
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /projects/{projectID}/github/branch-suggestions:
    get:
      tags:
        - github
      summary: List GitHub repo branch suggestions
      description: >-
        Suggests up to 50 branches of the project's linked repository whose
        names match a prefix.


        Use this tool when you need to:

        - Autocomplete a branch name for a task or a review on the project

        - Check whether a branch exists on the project's repository


        Examples:

        - GET /projects/{projectID}/github/branch-suggestions?prefix=feat/


        Hints:

        - projectID is the project's uuid; prefix is required and refused with
        422 when blank or not a valid start of a branch name.

        - has_more is true when more than the 50 returned branches match; narrow
        the prefix to see them.

        - Use fetchGithubRepoTree instead to list the files of a branch.

        - Owners, admins and members of the project's organization; a viewer or
        billing member is refused with 403 org_role_insufficient and a project
        the caller cannot see is 404.

        - Refused with 400 when the project has no linked repository, 404 when
        GitHub no longer has it, 409 when the project's GitHub access is
        disconnected or github_reconnect_required, 502 when GitHub fails to
        answer and 503 when the integration is disabled.

        - An agent host's grant is refused with 403
        agent_host_route_not_allowed.
      operationId: listGithubRepoBranchSuggestions
      parameters:
        - in: path
          name: projectID
          required: true
          schema:
            format: uuid
            type: string
        - explode: false
          in: query
          name: prefix
          required: true
          schema:
            minLength: 1
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitHubBranchList'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/GithubErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Bad Gateway
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GithubErrorResponse'
          description: Service Unavailable
components:
  schemas:
    GitHubBranchList:
      additionalProperties: false
      properties:
        branches:
          items:
            $ref: '#/components/schemas/GitHubBranch'
          type: array
        has_more:
          type: boolean
      required:
        - branches
        - has_more
      type: object
    GithubErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - bad_gateway
            - bad_request
            - cli_upgrade_required
            - client_outdated
            - conflict
            - control_forbidden
            - creator_github_access_missing
            - forbidden
            - gateway_timeout
            - github_claim_unverified
            - github_identity_mismatch
            - github_reconnect_required
            - github_ref_not_found
            - gone
            - internal_error
            - method_not_allowed
            - no_dispatch_target
            - not_acceptable
            - not_found
            - not_implemented
            - org_role_insufficient
            - org_suspended
            - payment_required
            - precondition_failed
            - project_archived
            - project_has_no_repository
            - project_repo_disconnected
            - project_repository_differs
            - push_file_too_large
            - push_rejected
            - push_secret_detected
            - rate_limited
            - repository_administration_not_granted
            - repository_already_connected
            - repository_create_forbidden
            - repository_create_rejected
            - repository_created_not_linked
            - repository_owner_not_caller
            - request_canceled
            - request_timeout
            - request_too_large
            - save_in_progress
            - save_requires_task_creator
            - service_unavailable
            - task_already_saved
            - task_backed_by_work_tree
            - task_bound_at_creation
            - task_branch_diverged
            - task_branch_is_default
            - task_branch_mismatch
            - task_branch_missing
            - task_creator_deleted
            - task_executing
            - task_file_too_large
            - task_has_no_commits
            - task_has_no_files
            - task_history_has_merges
            - task_is_child
            - task_not_started
            - task_rebase_in_progress
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - working_tree_dirty
            - workspace_gone
            - workspace_outdated
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    GitHubBranch:
      additionalProperties: false
      properties:
        name:
          minLength: 1
          type: string
      required:
        - name
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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