---
title: "Get Repository Branches"
method: GET
path: "/api/v2/repos/{username}/{repo_name}/branches"
---

# Get Repository Branches

`GET /api/v2/repos/{username}/{repo_name}/branches`

## Request

- The document declares no server URL.
- Auth: none declared
- TypeScript: <https://skmtc.dev/modaic-ai/apis/modaic-api/docs/api/v2/repos/:username/:repo_name/branches/get.ts> (a function with typed inputs; its response is checked against the schema)

List all branches in repo repository

## Path parameters

- `username` string, required
- `repo_name` string, required

## Query parameters

- `page` integer: Page number
- `limit` integer: Number of branches per page

## Headers

- `authorization` string, nullable

## Cookies

- `modaic_session` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/modaic-ai/apis/modaic-api.md) - [All operations](https://skmtc.dev/modaic-ai/apis/modaic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/modaic-ai/apis/modaic-api/revisions/43a90513ac59?raw)
