---
title: "Get all branches for a project"
method: GET
path: "/insights/{project-slug}/branches"
tags: ["Insights"]
---

# Get all branches for a project

`GET /insights/{project-slug}/branches`

## Request

- Base URL: `https://circleci.com/api/v2`
- URL: `https://circleci.com/api/v2/insights/{project-slug}/branches`
- Auth: one of:
  - API key in header `Circle-Token`
  - HTTP bearer
  - HTTP basic
  - API key in query parameter `circle-token`

Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000.

## Path parameters

- `project-slug` string, required

## Query parameters

- `workflow-name` string

## Response `200`

A list of branches for a project

- object: Project branches response.
  - `org_id` unknown, required
  - `project_id` unknown, required
  - `branches` string[], required: A list of all the branches for a given project.

## Other responses

- `default`: Error response.

---

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