Create

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

Creates a new file 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
branchstring
The name of the branch to commit to
messagerequiredstring
The commit message
contentrequiredstring
The base64-encoded content of the file
pathrequiredstring
The path where the new file should be created

Response

RESPONSE BODY
urlread-onlystring
API endpoint to GET this object
html_urlread-onlystring
Web URL to view this object in Buddy.works
contentRepositoryContentView
commitShortCommitView

Last modified on Jan 26, 2026

Request example

curl -X POST "https://api.buddy.works/workspaces/:workspace/projects/:project_name/repository/contents" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json" \ -d '{ "path": "docs/API.md", "content": "IyBBUEkgRG9jdW1lbnRhdGlvbgoKVGhpcyBkb2N1bWVudCBkZXNjcmliZXMgdGhlIEFQSS4=", "message": "Add API documentation", "branch": "main" }'