Create

  • POST
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /repository
  • /branches

Creates a new branch in the repository

Request

REQUIRED SCOPES
REPOSITORY_WRITE
URL PARAMETERS
workspacerequiredstring
The human-readable ID of the workspace

Example: "my-company"

project_namerequiredstring
The human-readable ID of the project

Example: "my-project"

POST PARAMETERS
namerequiredstring
The name of the branch
commitCommitReference
The commit containing the revision field
descriptionstring
The description of the branch

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
namestring
The name of the branch
commitShortCommitView
descriptionstring
The description of the branch
defaultboolean
Indicates whether this branch is default branch in the repository

Last modified on Jan 26, 2026

Request example

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/branches" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "name": "feature/new-authentication", "commit": { "revision": "abc123def456" }, "description": "Branch for implementing new authentication system" }'