Delete

  • DEL
  • /workspaces
  • /:workspace
  • /projects
  • /:project_name
  • /repository
  • /contents
  • /:path

Deletes a file from 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"

pathrequiredstring
The path to the file in the repository

Constraints: Pattern: .+

Example: "src/main.js"

POST PARAMETERS
branchstring
The name of the branch to commit to
messagerequiredstring
The commit message

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
revisionstring
The full SHA hash of the commit
author_datestring
The date when the commit was authored
commit_datestring
The date when the commit was committed
short_revisionstring
The short SHA hash of the commit (first 7 characters)
messagestring
The commit message
committerMemberView
User/member reference
authorMemberView
User/member reference

Last modified on Jan 26, 2026

Request example

curl -X DELETE "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/contents/:path" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "message": "Delete obsolete file", "branch": "main" }'