Upload File to Sandbox

  • POST
  • /workspaces
  • /:workspace_domain
  • /sandboxes
  • /:sandbox_id
  • /content
  • /upload
  • /:path

Upload a file to a sandbox

Request

REQUIRED SCOPES
SANDBOX_MANAGE
URL PARAMETERS
workspace_domainrequiredstring
The human-readable ID of the workspace

Example: "my-company"

sandbox_idrequiredstring
The ID of the sandbox

Example: "sb-1234567890abcdef"

pathrequiredstring
Absolute path where the file should be uploaded. Recommended directory is /buddy

Constraints: Pattern: .*

Example: "buddy/example.txt"

Response

RESPONSE BODY
typestring enum
The content type (FILE or DIR)
Allowed enum:
FILE,
DIR
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 file or directory
pathstring
The path to the file or directory
sizeinteger
The size of the file in bytes

Last modified on Jan 26, 2026

Request example

CURL
curl -X POST "https://api.buddy.works/workspaces/:workspace_domain/sandboxes/:sandbox_id/content/upload/:path" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "Content-Type: application/json"
EXAMPLE RESPONSE
{ "url": "https://api.buddy.works/workspaces/my-workspace/sandboxes/sb-12345/content/buddy/src/index.js", "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345", "type": "FILE", "name": "index.js", "path": "/buddy/src/index.js", "size": 1024 }
STATUS
201 File uploaded successfully