---
title: "Reset a branch to its parent's current state"
method: POST
path: "/projects/{id}/databases/{databaseName}/branches/{branchName}/reset"
tags: ["Database Branches"]
---

# Reset a branch to its parent's current state

`POST /projects/{id}/databases/{databaseName}/branches/{branchName}/reset`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/databases/{databaseName}/branches/{branchName}/reset`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Discards everything written on the branch and re-forks it from the
parent as it is now.

Returns immediately with the branch in `provisioning`. The rewind runs in
the background; poll the branch until it reports `active` before
connecting again.

The branch keeps its name and its connection string, so anything holding
that string keeps working once it is active again, and its lifetime is
re-armed to the duration it was created with. The branch does not serve
connections for the duration of the reset.

## Path parameters

- `id` string, uuid, required
- `databaseName` string, required
- `branchName` string, required

## Response `202`

Branch reset accepted; the branch is provisioning

- DatabaseBranch: A copy-on-write fork of a database, for development and testing. A branch starts as an exact copy of its parent's data and diverges from there. It has its own connection string and its own credential, so a branch password cannot reach the parent. Every branch expires. `expires_at` is a hard deadline: once it passes the branch stops accepting connections and is deleted. Use `PATCH` to extend a branch you are still working on.
  - `id` string, uuid, required
  - `database_id` string, uuid, required: The parent database this branch was forked from.
  - `project_id` string, uuid, required
  - `name` string, required: Branch name, unique within the parent database.
  - `status` 'provisioning' | 'active' | 'failed' | 'deleting', required: Branch status. A new branch starts `provisioning` and is not connectable until it reports `active`; poll this endpoint until it does. `connection_string` is only present while `active`. `provisioning` also covers a branch being rebuilt after a `reset`, and a build that is between retries, so it is the status to keep waiting on. `failed` is terminal: it means the platform gave up, and the branch will not become `active` on its own.
  - `connection_string` string: PostgreSQL connection URI for this branch. Present only while the branch is `active`. The URI carries the branch's own globally-unique username and password; `application_name` selects the access mode exactly as it does for the parent database: - `volcano_full_access` — Full admin access (DDL, migrations) - `volcano_user_access:{user_id}` — User impersonation (RLS enforced) - `volcano_user_access` — Anonymous access (anon role, RLS enforced)
  - `ttl_seconds` integer, required: The lifetime the branch was created with. Resetting a branch re-arms this same duration, so a reset never shortens a branch's remaining life.
  - `expires_at` string, date-time, required: When the branch stops serving connections and becomes eligible for deletion. Enforced on the connection path, so it holds even if reclamation is delayed.
  - `storage_bytes` integer: Bytes this branch has diverged from its parent, which is what a branch actually costs. Shared pages are not counted twice. Counts against the parent database's storage allowance. Absent until the branch has been sampled.
  - `last_invoked_at` string, date-time: Most recent request timestamp for this branch
  - `created_at` string, date-time, required
  - `updated_at` string, date-time, required

## Other responses

- `404`: Project, database, or branch not found
- `409`: The branch is not active, a reset is already in progress, the parent database is being restored, or the parent was restored within the last 24 hours — a reset re-forks from the parent, and the provider holds a child's reset shut for that long afterwards.
- `503`: Branching is temporarily unavailable

## Changes

- **2026-10-07** `23e7875e7c4c`: 1 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
- **2026-09-19** `3a6f365f3f35`: 7 breaking, 18 info
  - added the new path request parameter `branchName`
  - added the new path request parameter `databaseName`
  - added the new path request parameter `id`
  - the response's body type changed from no type to `object` for status `202`
  - …21 more
- **2026-08-27** `bb44e98aba2e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/databases/:databaseName/branches/:branchName/reset/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
