v17

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-08165682.0 MB
Database branches

Update a branch

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 write_database

OAuth Scopes

ResourceScopes
Organizationwrite_branches
Databasewrite_branches
Branchwrite_branch
patch/organizations/{organization}/databases/{database}/branches/{branch}

Path parameters

organizationstring required

The name of the organization the branch belongs to

databasestring required

The name of the database the branch belongs to

branchstring required

The name of the branch

Request body

new_namestring required

The name to update the branch

Response

Returns the updated branch

idstring required

The ID of the branch

namestring required

The name of the branch

created_atstring required

When the branch was created

updated_atstring required

When the branch was last updated

deleted_atstring nullable required

When the branch was deleted

restore_checklist_completed_atstring nullable required

When a user last marked a backup restore checklist as completed

schema_last_updated_atstring nullable required

When the schema for the branch was last updated

kind'mysql' | 'postgresql' required

The kind of branch

mysql_addressstring required

The MySQL address for the branch

mysql_edge_addressstring 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_vtgateboolean required

True if the branch allows passwords to connect directly to a vtgate, bypassing load balancers

vtgate_sizestring required

The size of the vtgate cluster for the branch

vtgate_countinteger required

The number of vtgate instances in the branch

cluster_namestring required

The SKU representing the branch's cluster size

cluster_iopsinteger nullable required

IOPS for the cluster

readyboolean required

Whether or not the branch is ready to serve queries

schema_readyboolean required

Whether or not the schema is ready for queries

metalboolean required

Whether or not this is a metal database

productionboolean required

Whether or not the branch is a production branch

safe_migrationsboolean required

Whether or not the branch has safe migrations enabled

shardedboolean required

Whether or not the branch is sharded

shard_countinteger required

The number of shards in the branch

keyspace_countinteger required

The number of keyspaces in the branch

stale_schemaboolean required

Whether or not the branch has a stale schema

private_edge_connectivityboolean required

True if private connections are enabled

has_replicasboolean required

True if the branch has replica servers

has_read_only_replicasboolean required

True if the branch has read-only replica servers

html_urlstring required

Planetscale app URL for the branch

urlstring required

Planetscale API URL for the branch

parent_branchstring nullable required

The name of the parent branch from which the branch was created

vtgate_optionsobject required

VTGate configuration options