# Getting list of all branches in a project

<mark style="color:green;">`GET`</mark> `/get-branch-list`

Use this endpoint to get list of all the available branches in a parsed repo

**Headers**

| Name          | Value            |
| ------------- | ---------------- |
| Authorization | `Bearer <token>` |

**Query Param**

| Name         | Type   | Description          |
| ------------ | ------ | -------------------- |
| repo\_`name` | string | username/branch-name |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
    "branches": [
        "branch1",
        "main",
        "branch2"
    ]
}
```

{% endtab %}

{% tab title="404" %}
{% code overflow="wrap" %}

```json
{
    "detail": "Repository not found or error fetching branches: 400: Failed to get installation ID"
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

{% hint style="info" %}
404 in this case would ususally mean that we do not have access to the codebase / github repo or it doesn't exist.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.momentum.sh/using-momentum/getting-list-of-all-branches-in-a-project.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
