Create Sandbox Directory

  • POST
  • /workspaces
  • /:workspace
  • /sandboxes
  • /:sandbox_id
  • /content
  • /:path

Create a directory in a sandbox

Request

REQUIRED SCOPES
SANDBOX_MANAGE
URL PARAMETERS
workspacerequiredstring
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 directory should be created

Constraints: Pattern: .*

Example: "buddy/new-folder"

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/sandboxes/:sandbox_id/content/: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/new-folder", "html_url": "https://app.buddy.works/my-project/sandboxes/sb-12345", "type": "DIR", "name": "new-folder", "path": "/buddy/new-folder" }
STATUS
201 Directory created successfully