---
title: "Upsert a change request for cluster size, replicas, storage, or parameters"
method: PATCH
path: "/organizations/{organization}/databases/{database}/branches/{branch}/changes"
tags: ["Branch changes"]
---

# Upsert a change request for cluster size, replicas, storage, or parameters

`PATCH /organizations/{organization}/databases/{database}/branches/{branch}/changes`

### 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**

 | Resource | Scopes |
| :------- | :---------- |
| Organization | `write_databases` |
| Database | `write_database` |

## Path parameters

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

## Request body

- object
  - `cluster_size` string — The size of the cluster. Available sizes can be found using the 'List cluster sizes' endpoint.
  - `replicas` integer — The total number of replicas
  - `parameters` object — Cluster configuration parameters nested by namespace (e.g., {"pgconf": {"max_connections": "200"}}). Use the 'List cluster parameters' endpoint to retrieve available parameters. Supported namespaces include 'patroni', 'pgconf', and 'pgbouncer'.
  - `storage` object
    - `minimum_storage_bytes` integer — The minimum storage size in bytes.
    - `maximum_storage_bytes` integer — The maximum storage size in bytes for autoscaling.
    - `storage_autoscaling` boolean — Whether storage autoscaling is enabled.
    - `storage_iops` integer — The storage IOPS.
    - `storage_throughput_mibs` integer — The storage throughput in MiB/s.
    - `confirm_shrink` boolean — Re-apply the current minimum disk size to shrink the provisioned disk.

## Response `200`

Returns the branch change request

- object
  - `id` string, required — The ID of the branch change request
  - `state` 'queued' | 'pending' | 'resizing' | 'canceled' | 'completed', required — The state of the branch change request
  - `started_at` string, nullable, required — The time the branch change request started
  - `completed_at` string, nullable, required — The time the branch change request completed
  - `created_at` string, required — The time the branch change request was created
  - `updated_at` string, required — The time the branch change request was last updated
  - `actor` object, 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
  - `cluster_name` string, required — The SKU representing the branch cluster
  - `cluster_display_name` string, required — The SKU representing the branch cluster for display
  - `cluster_metal` boolean, required — Whether or not this is a metal database
  - `replicas` integer, required — The total number of replicas
  - `version` string, required — The PostgreSQL version after the change
  - `parameters` object, required — The branch parameters
  - `previous_cluster_name` string, required — The previous SKU representing the branch cluster
  - `previous_cluster_display_name` string, required — The previous SKU representing the branch cluster for display
  - `previous_cluster_metal` boolean, required — Whether or not the previous SKU was a metal database
  - `previous_replicas` integer, required — The previous total number of replicas
  - `previous_version` string, required — The PostgreSQL version before the change
  - `previous_parameters` object, required — The previous branch parameters
  - `minimum_storage_bytes` integer, required — The minimum storage size in bytes
  - `maximum_storage_bytes` integer, required — The maximum storage size in bytes
  - `storage_autoscaling` boolean, required — Whether storage autoscaling is enabled
  - `storage_shrinking` boolean, required — Whether storage shrinking is enabled when autoscaling is enabled
  - `storage_type` 'gp3' | 'io2' | 'pd_ssd' | 'hyperdisk_balanced' | 'premium_v2_lrs', required — The storage type (gp3 or io2)
  - `storage_iops` integer, required — The storage IOPS
  - `storage_throughput_mibs` integer, required — The storage throughput in MiB/s
  - `previous_minimum_storage_bytes` integer, required — The previous minimum storage size in bytes
  - `previous_maximum_storage_bytes` integer, required — The previous maximum storage size in bytes
  - `previous_storage_autoscaling` boolean, required — Whether storage autoscaling was previously enabled
  - `previous_storage_shrinking` boolean, required — Whether storage shrinking was previously enabled
  - `previous_storage_type` string, required — The previous storage type
  - `previous_storage_iops` integer, required — The previous storage IOPS
  - `previous_storage_throughput_mibs` integer, required — The previous storage throughput in MiB/s
  - `confirm_shrink` boolean, required — Whether the change re-applies the current minimum disk size to shrink the provisioned disk

## Other responses

- `204` — No changes to apply
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

## Changes

- **2026-08-26** `0b43a2011e53` — 4 info
  - added the new optional request property `storage/confirm_shrink`
  - added the required property `confirm_shrink` to the response with the `200` status
  - added the required property `previous_version` to the response with the `200` status
  - added the required property `version` to the response with the `200` status
- **2026-08-11** `058268c1f303` — 2 warning
  - added the new `hyperdisk_balanced` enum value to the `storage_type` response property for the response status `200`
  - added the new `premium_v2_lrs` enum value to the `storage_type` response property for the response status `200`
- **2026-08-11** `4b2e4f05bda2` — 1 breaking
  - removed the required property `restart` from the response with the `200` status
- **2026-07-08** `fa19f3305241` — 1 info
  - added the new optional request property `storage`
- **2026-06-01** `72506953f367` — 2 breaking
  - the response property `completed_at` became nullable for the status `200`
  - the response property `started_at` became nullable for the status `200`

[Full history](https://skmtc.dev/planetscale/apis/planetscale-api/changes/organizations/:organization/databases/:database/branches/:branch/changes/patch.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)
