---
title: "Update branch details"
method: PATCH
path: "/organizations/{organizationID}/projects/{projectID}/branches/{branchID}"
tags: ["Branches"]
---

# Update branch details

`PATCH /organizations/{organizationID}/projects/{projectID}/branches/{branchID}`

Updates the configuration of a specific branch by its ID, such as changing its name, description, or resource allocation.

## Path parameters

- `organizationID` string, required
- `projectID` string, required
- `branchID` string, required

## Request body

- BranchUpdateDetails — Details that can be updated for an existing branch
  - `name` string — New name for the branch
  - `description` string — New description for the branch (max 50 characters)
  - `replicas` integer — Number of database replicas to scale to
  - `storage` integer — Branch storage in GiB (gigabytes). The maximum allowed value depends on the organization's storage limit.
  - `instanceType` string — New instance type for the branch
  - `backupConfiguration` BackupConfiguration — Details about the branch continuous backup configuration
    - `retentionPeriod` integer — how long are we keeping the backups around for
    - `backupTime` string — time of day/week when we are taking a full backup
  - `hibernate` boolean — Enabled when the branch should be hibernated, disabled if it needs to be reactivated.
  - `scaleToZero` ScaleToZeroConfiguration — Configuration for scaling branches to zero when not in use
    - `enabled` boolean, required — Whether scale to zero is enabled
    - `inactivityPeriodMinutes` integer, required — Duration in minutes after which branches will be hibernated if not accessed
  - `postgresConfigurationParameters` object — Arbitrary PostgreSQL configuration parameters for the cluster
  - `preloadLibraries` string[] — List of PostgreSQL extensions and libraries to preload
  - `image` string — PostgreSQL image to use for the database instances

## Response `200`

Branch successfully updated

- BranchShortMetadata — Basic metadata about a branch, used in response to create/update operations
  - `id` string, required — Unique identifier for the branch
  - `name` string, required — Human-readable name of the branch
  - `description` string — Optional description of the branch purpose or contents
  - `createdAt` string, date-time, required — Timestamp when the branch was created
  - `updatedAt` string, date-time, required — Timestamp when the branch was last updated
  - `parentID` string, nullable — Identifier of the parent branch if this is a derived branch, null otherwise
  - `connectionString` string, nullable — Deprecated: retrieve the connection string from the branch credentials endpoint (GET .../branches/{branchID}/credentials) instead. The hostname in this connection string carries a -deprecated marker in its first DNS label.
  - `region` string, required — Geographic region where the branch is deployed
  - `publicAccess` boolean, required — Whether the branch allows public access without authentication

## Other responses

- `400` — Generic error response for most error conditions
- `401` — Error response when authentication or authorization fails
- `404` — Generic error response for most error conditions
- `5XX` — Unexpected Error
- `default` — Unexpected Error

## Changes

- **2026-07-27** `b62e5dfec032` — 1 info
  - response property `connectionString` deprecated
- **2026-07-26** `11b9ee199d56` — 1 warning
  - the `storage` request property's min was set to `1.00`

[Change history](https://skmtc.dev/xata/apis/xata-api/changes/organizations/:organizationID/projects/:projectID/branches/:branchID/patch.md)

---

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