Skip to content

delete_branch

Delete a branch from a project. The default branch (main) cannot be deleted. Typically used to clean up scenario branches after merge_branch or merge_pull_request. Requires Owner role. Returns: project (str) — project name; branch (str) — deleted branch name; deleted (bool) — always true on success.

destructive

NameTypeRequiredDefaultDescription
project_namestrYes
branch_namestrYes

Returns a structured object. Top-level fields:

  • project (string)
  • branch (string)
  • deleted (boolean)

See the response example below for the full payload shape.

{
"name": "delete_branch",
"arguments": {
"project_name": "forecasts",
"branch_name": "scenario/aggressive-growth"
}
}
{
"project": "forecasts",
"branch": "scenario/aggressive-growth",
"deleted": true
}
  • Module: Branches
  • Requires authentication via API token or Auth0 JWT.