Delete branch

http
DELETE /projects/{project_reference}/branches/{branch_id}

Delete a branch and its uncommitted changes. Requires project.files.write; API keys also need delete scope.

Parameters

NameInRequiredDescription
project_referencepathYesProject slug, UUID, or domain that identifies the project.
branch_idpathYesBranch to delete. Only a branch with a base branch can be deleted, excluding main. Its associated content is removed.

Responses

StatusDescription
200Branch deleted successfully.
400Bad request
401Unauthorized
403Forbidden. API keys also require delete scope.
404Not found
409Conflict
500Server error
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.