Skip to main content
DELETE
/
api
/
v1
/
repos
/
branches
Delete Branch
curl --request DELETE \
  --url https://api.{cluster}.code.storage/api/v1/repos/branches \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "ephemeral": false,
  "name": "feature/old-onboarding"
}
'
{
  "ephemeral": false,
  "message": "branch deleted",
  "name": "feature/old-onboarding"
}

Documentation Index

Fetch the complete documentation index at: https://code.storage/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Delete a branch by name. The server resolves the current branch tip before deleting, so the caller does not need the branch SHA.

Branch deletion request identifying the branch to remove.

name
string
required

Branch name to delete. Must not start with refs/.

Example:

"feature/old-onboarding"

ephemeral
boolean

Delete branch from the ephemeral namespace instead of the persistent one.

Example:

false

Response

Branch deletion result.

Result of deleting a branch.

ephemeral
boolean
required

Whether the deleted branch lived in the ephemeral namespace.

Example:

false

message
string
required

Human-readable result message.

Example:

"branch deleted"

name
string
required

Deleted branch name.

Example:

"feature/old-onboarding"