---
title: "List branches for a project"
method: GET
path: "/v0/projects/{project}/branches"
tags: ["projects", "branches"]
---

# List branches for a project

`GET /v0/projects/{project}/branches`

List all branches for a project. If the project is public, then the user does not need to be authenticated. If the project is private, then the user must be authenticated and have `view` permissions for the project, or provide a valid project key for the project. By default, the branches are sorted in alphabetical order by name. The HTTP response header `X-Total-Count` contains the total number of branches.

## Path parameters

- `project` string, required

## Query parameters

- `direction` 'asc' | 'desc'
- `page` integer, nullable
- `per_page` integer, nullable
- `sort` 'name' — Sort by branch name.
- `archived` boolean, nullable
- `name` string
- `search` string

## Response `200`

successful operation

- JsonBranch[]
  - `archived` string, date-time
  - `created` string, date-time, required
  - `head` JsonHead, required
    - `created` string, date-time, required
    - `replaced` string, date-time
    - `start_point` JsonStartPoint
      - `branch` string, uuid, required
      - `head` string, uuid, required
      - `version` JsonVersion, required
        - `hash` string
        - `number` integer, required
    - `uuid` string, uuid, required
    - `version` JsonVersion
      - `hash` string
      - `number` integer, required
  - `modified` string, date-time, required
  - `name` string, required
  - `project` string, uuid, required
  - `slug` string, required
  - `uuid` string, uuid, required

## Other responses

- `4XX` — Error
- `5XX` — Error

---

[API](https://skmtc.net/bencherdev/apis/bencher-api.md) · [All operations](https://skmtc.net/bencherdev/apis/bencher-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bencherdev/bencher-api/versions/84086e99e6cd/schema)
