---
title: "List all database branches"
method: GET
path: "/v1/projects/{ref}/branches"
tags: ["Environments"]
---

# List all database branches

`GET /v1/projects/{ref}/branches`

Returns all database branches of the specified project.

## Path parameters

- `ref` string, required

## Response `200`

- BranchResponse[]
  - `id` string, uuid, required
  - `name` string, required
  - `project_ref` string, required
  - `parent_project_ref` string, required
  - `is_default` boolean, required
  - `git_branch` string
  - `pr_number` integer
  - `latest_check_run_id` number — This field is deprecated and will not be populated.
  - `persistent` boolean, required
  - `status` 'CREATING_PROJECT' | 'RUNNING_MIGRATIONS' | 'MIGRATIONS_PASSED' | 'MIGRATIONS_FAILED' | 'FUNCTIONS_DEPLOYED' | 'FUNCTIONS_FAILED', required — This field is deprecated. List action runs to get branch status instead.
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required
  - `review_requested_at` string, date-time
  - `with_data` boolean, required
  - `notify_url` string, uri
  - `deletion_scheduled_at` string, date-time
  - `preview_project_status` 'INACTIVE' | 'ACTIVE_HEALTHY' | 'ACTIVE_UNHEALTHY' | 'COMING_UP' | 'UNKNOWN' | 'GOING_DOWN' | 'INIT_FAILED' | 'REMOVED' | 'RESTORING' | 'UPGRADING' | 'PAUSING' | 'RESTORE_FAILED' | 'RESTARTING' | 'PAUSE_FAILED' | 'RESIZING'

## Other responses

- `500` — Failed to retrieve database branches

---

[API](https://skmtc.dev/supabase/apis/management-api.md) · [All operations](https://skmtc.dev/supabase/apis/management-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/supabase/management-api/revisions/a7cb39418064/schema)
