---
search:
  tags:
    - GitHub
    - GET
seo:
  description: >-
    Returns a… Reference for the GET
    /integration/github/installations/{installation_id}/repositories/{repository_id}/branches
    endpoint in the Platform API.
sidebar:
  label: List repository branches
  badge: GET
title: List repository branches
type: openapi-operation
---
Returns a repository's branches, read from GitHub, once the installation is checked to still have access to the repository.

`GET /integration/github/installations/{installation_id}/repositories/{repository_id}/branches`

**Responses**

- `200` — Live GitHub branches retrieved
- `422` — Installation or repository is inactive or inaccessible
- `503` — GitHub is temporarily unavailable
- `default` — Error

Response example, 200:

```json
{
  "records": [
    {
      "name": "string",
      "head_sha": "string",
      "protected": true
    }
  ],
  "page": 1,
  "per_page": 1,
  "next_page": 1
}
```
