---
title: "Cli Delete Branch"
method: DELETE
path: "/v1/cli/branches/{branch_id}"
tags: ["v1-cli"]
---

# Cli Delete Branch

`DELETE /v1/cli/branches/{branch_id}`

Delete a branch asynchronously (ARD-1453), in parity with branch create.

Returns 202 + an operation handle; the CLI polls
``GET /v1/operations/{operation_id}`` for staged progress and the terminal
outcome. The teardown runs in the ``branch_delete.v1`` DBOS durable workflow
(mark deleting -> external cleanup -> finalize), so a crash mid-teardown is
recovered by DBOS rather than stranding the row in ``deleting`` with no
retry driver. Audit ordering and the partial-cleanup terminal-failed
semantics are preserved inside the workflow.

Idempotency:
  * A concurrent or retried delete of the same branch coalesces onto the
    active operation via the ``(type, resource_id)`` partial unique index —
    no second workflow is enqueued.
  * A re-delete of an already-gone branch polls the prior delete operation
    to completion (clean no-op) instead of 404ing.

## Path parameters

- `branch_id` string, required

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/tryardent/apis/fastapi.md) · [All operations](https://skmtc.net/tryardent/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tryardent/fastapi/revisions/f92d8d54bae2/schema)
