ContestDrop your site, win 2x $500 in credits.Drop your site, share it on X, win 2x $500 in credits.Enter nowEnter now

Update

View as Markdown
  • PATCH
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /repository
  • /branches
  • /:name

Updates the access permissions of a branch

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"

namerequiredstring
The name of the branch

Example: "main"

BODY PARAMETERS
permissionsPermissionsView
Access permissions configuration

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
The commit containing the revision field
descriptionstring
The description of the branch
permissionsPermissionsView
Access permissions configuration
defaultboolean
Indicates whether this branch is default branch in the repository

Last modified on Oct 7, 2026

Request example

curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/branches/:name" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "permissions": { "others": "READ_ONLY", "users": [ { "id": 42, "access_level": "READ_WRITE" } ], "groups": [ { "id": 15, "access_level": "READ_ONLY" } ] } }'