Skip to main content
Removes all versions of a branch reference while preserving the data in long-term storage (soft delete).
DELETE /api/v2/repos/{team}/{repo}/branch-ref/{branchName}
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

ParameterTypeDescription
teamRequiredTeam or organization name
repoRequiredRepository name
branchNameRequiredName of the branch to remove

JWT Requirements

  • Requires git:write scope
  • JWT must include the repository in the repo claim

Response

{
  "message": "Branch reference removed successfully",
  "branch": "feature/old-feature",
  "preserved": true
}

Notes

  • This is a soft delete operation - the branch data is preserved in long-term storage
  • The branch can potentially be restored later
  • This does not affect the underlying commits or file history

Error Responses

StatusDescription
404 Not FoundBranch doesn’t exist
401 UnauthorizedInvalid JWT or missing git:write scope