v1
latestOpenAPI 3.0.3Proprietary2026-07-26162247330.6 KBDelete branch
Deletes the specified branch from a project and places all compute endpoints into an idle state, breaking existing client connections.
The deletion completes after all operations finish. You cannot delete a project's root or default branch, or a branch that has a child branch. A project must have at least one branch.
By default, deleted branches can be recovered within a 7-day grace period. Use the hard_delete parameter to permanently delete the branch immediately. For related information, see Manage branches.
Query parameters
If true, the branch is permanently deleted immediately without a recovery window. If false (default), the branch can be recovered within 7 days via the recover endpoint.
This parameter is part of the Branch Recovery feature, which is in preview and not available to all users.
Response
Deleted the specified branch
Example response
{
"branch": {
"id": "br-wispy-meadow-118737",
"project_id": "spring-example-302709",
"parent_id": "br-aged-salad-637688",
"parent_lsn": "0/1DE2850",
"name": "dev2",
"protected": false,
"current_state": "ready",
"state_changed_at": "2022-11-30T20:09:48Z",
"creation_source": "console",
"created_at": "2022-11-30T19:09:48Z",
"updated_at": "2022-12-01T19:53:05Z",
"default": true,
"init_source": "parent-data",
"data_transfer_bytes": 72911987,
"written_data_bytes": 542998300,
"compute_time_seconds": 823880990,
"active_time_seconds": 922200,
"cpu_used_sec": 461100
},
"operations": [
{
"id": "d8ac46eb-a757-42b1-9907-f78322ee394e",
"project_id": "spring-example-302709",
"branch_id": "br-wispy-meadow-118737",
"endpoint_id": "ep-silent-smoke-806639",
"action": "start_compute",
"status": "finished",
"failures_count": 0,
"created_at": "2022-11-15T20:02:00Z",
"updated_at": "2022-11-15T20:02:02Z",
"total_duration_ms": 200
}
]
}