Create branch

http
POST /projects/{project_reference}/branches

Create a branch from the project root or from another branch, snapshotting its files. Requires project.files.write.

Parameters

NameInRequiredDescription
project_referencepathYes

Request body

FieldTypeRequiredDescription
namestringYesBranch name. Branch name may only contain letters, numbers, ".", "_", "/" and "-", and cannot start with "-".
base_branch_idstring,nullOmit to branch from the project root (created automatically if missing). Use null to create a root branch; rejected if a root already exists. A UUID must identify a base branch in this project.
descriptionstringBranch description.
auto_delete_on_mergebooleanDelete the branch after it merges. Defaults to false.

Responses

StatusDescription
201Branch created successfully.
400Bad request
401Unauthorized
403Forbidden
404Not found
409Conflict
413Payload too large
500Server error
503internal: authentication state is temporarily unavailable and the request was not processed; retry shortly.