---
title: "List branches"
method: GET
path: "/organizations/{organization}/databases/{database}/branches"
tags: ["Database branches"]
---

# List branches

`GET /organizations/{organization}/databases/{database}/branches`

### Authorization
A service token or OAuth token must have at least one of the following access or scopes in order to use this API endpoint:

**Service Token Accesses**
 `read_branch`, `delete_branch`, `create_branch`, `connect_production_branch`, `connect_branch`

**OAuth Scopes**

 | Resource | Scopes |
| :------- | :---------- |
| Organization | `read_branches` |
| Database | `read_branches` |
| Branch | `read_branch` |

## Path parameters

- `organization` string, required
- `database` string, required

## Query parameters

- `q` string
- `production` boolean
- `safe_migrations` boolean
- `order` 'asc' | 'desc'
- `page` integer
- `per_page` integer

## Response `200`

Returns database branches

- object
  - `type` string, required — The response type. Always "list" for paginated responses.
  - `current_page` integer, required — The current page number
  - `per_page` integer, required — The maximum number of results per page
  - `next_page` integer, nullable, required — The next page number, or null when this is the last page
  - `next_page_url` string, nullable, required — The next page of results, or null when this is the last page
  - `prev_page` integer, nullable, required — The previous page number, or null when this is the first page
  - `prev_page_url` string, nullable, required — The previous page of results, or null when this is the first page
  - `total_count` integer, required — The total number of matching results
  - `total_pages` integer, required — The total number of pages of matching results
  - `data` object[], required
    - `id` string, required — The ID of the branch
    - `name` string, required — The name of the branch
    - `created_at` string, required — When the branch was created
    - `updated_at` string, required — When the branch was last updated
    - `deleted_at` string, nullable, required — When the branch was deleted
    - `restore_checklist_completed_at` string, nullable, required — When a user last marked a backup restore checklist as completed
    - `schema_last_updated_at` string, nullable, required — When the schema for the branch was last updated
    - `kind` 'mysql' | 'postgresql', required — The kind of branch
    - `mysql_address` string, required — The MySQL address for the branch
    - `mysql_edge_address` string, required — The address of the MySQL provider for the branch
    - `state` 'pending' | 'sleep_in_progress' | 'sleeping' | 'awakening' | 'ready', required — The current state of the branch
    - `direct_vtgate` boolean, required — True if the branch allows passwords to connect directly to a vtgate, bypassing load balancers
    - `vtgate_size` string, required — The size of the vtgate cluster for the branch
    - `vtgate_name` string, nullable, required — The public SKU representing the VTGate size
    - `vtgate_count` integer, required — The number of vtgate instances in the branch
    - `vtgate_autoscaling` boolean, required — Whether VTGate autoscaling is enabled
    - `vtgate_max_count` integer, nullable, required — The maximum number of VTGate instances when autoscaling is enabled
    - `vtgate_target_cpu_utilization` integer, nullable, required — The target CPU utilization for VTGate autoscaling
    - `cluster_name` string, required — The SKU representing the branch's cluster size
    - `cluster_iops` integer, nullable, required — IOPS for the cluster
    - `ready` boolean, required — Whether or not the branch is ready to serve queries
    - `schema_ready` boolean, required — Whether or not the schema is ready for queries
    - `metal` boolean, required — Whether or not this is a metal database
    - `production` boolean, required — Whether or not the branch is a production branch
    - `safe_migrations` boolean, required — Whether or not the branch has safe migrations enabled
    - `deletion_protected` boolean, required — Whether deletion protection is enabled for the branch
    - `sharded` boolean, required — Whether or not the branch is sharded
    - `shard_count` integer, required — The number of shards in the branch
    - `keyspace_count` integer, required — The number of keyspaces in the branch
    - `stale_schema` boolean, required — Whether or not the branch has a stale schema
    - `actor` object, nullable, required
      - `id` string, required — The ID of the actor
      - `display_name` string, required — The name of the actor
      - `avatar_url` string, required — The URL of the actor's avatar
    - `restored_from_branch` object, nullable, required
      - `id` string, required — The ID for the resource
      - `name` string, required — The name for the resource
      - `created_at` string, required — When the resource was created
      - `updated_at` string, required — When the resource was last updated
      - `deleted_at` string, nullable, required — When the resource was deleted, if deleted
    - `private_edge_connectivity` boolean, required — True if private connections are enabled
    - `has_replicas` boolean, required — True if the branch has replica servers
    - `has_read_only_replicas` boolean, required — True if the branch has read-only replica servers
    - `html_url` string, required — Planetscale app URL for the branch
    - `url` string, required — Planetscale API URL for the branch
    - `region` object, required
      - `id` string, required — The ID of the region
      - `provider` string, required — Provider for the region (ex. AWS)
      - `enabled` boolean, required — Whether or not the region is currently active
      - `public_ip_addresses` string[], required — Public IP addresses for the region
      - `display_name` string, required — Name of the region
      - `location` string, required — Location of the region
      - `slug` string, required — The slug of the region
      - `current_default` boolean, required — True if the region is the default for new branch creation
      - `mysql_supported` boolean, required — Whether the region supports MySQL/Vitess databases
      - `postgresql_supported` boolean, required — Whether the region supports PostgreSQL databases
    - `parent_branch` string, nullable, required — The name of the parent branch from which the branch was created
    - `vtgate_options` object, required — VTGate configuration options

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-08-13** `69bdece4890a` — 1 breaking
  - removed the required property `data/items/deletion_protection_managed` from the response with the `200` status
- **2026-08-12** `fd4480152110` — 2 info
  - added the required property `data/items/deletion_protected` to the response with the `200` status
  - added the required property `data/items/deletion_protection_managed` to the response with the `200` status
- **2026-08-11** `4b2e4f05bda2` — 7 info
  - added the required property `data/items/vtgate_autoscaling` to the response with the `200` status
  - added the required property `data/items/vtgate_max_count` to the response with the `200` status
  - added the required property `data/items/vtgate_name` to the response with the `200` status
  - added the required property `data/items/vtgate_target_cpu_utilization` to the response with the `200` status
  - …3 more
- **2026-07-08** `fa19f3305241` — 1 info
  - added the required property `data/items/keyspace_count` to the response with the `200` status
- **2026-06-01** `72506953f367` — 12 breaking, 3 info
  - the response property `data/items/actor` became nullable for the status `200`
  - the response property `data/items/cluster_iops` became nullable for the status `200`
  - the response property `data/items/deleted_at` became nullable for the status `200`
  - the response property `data/items/parent_branch` became nullable for the status `200`
  - …11 more

[Full history](https://skmtc.dev/planetscale/apis/planetscale-api/changes/organizations/:organization/databases/:database/branches/get.md)

---

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