# Create Sandbox Directory

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

Create a directory in a sandbox

**Required Scopes:** `SANDBOX_WRITE`

## URL Parameters

```typescript
interface URLParameters {
  /** The human-readable ID of the workspace */
  workspace: string; // Example: "my-company"
  /** The ID of the sandbox */
  sandbox_id: string; // Example: "sb-1234567890abcdef"
  /** Absolute path where the directory should be created */
  path: string; // Example: "buddy/new-folder"
}
```

## Response Body

```typescript
interface ResponseBody {
  /** The content type (FILE or DIR) */
  type?: "FILE" | "DIR";
  /** API endpoint to GET this object */
  url?: string;
  /** Web URL to view this object in Buddy.works */
  html_url?: string;
  /** The name of the file or directory */
  name?: string;
  /** The path to the file or directory */
  path?: string;
  /** The size of the file in bytes */
  size?: number;
}
```

## Response Example

**Status:** `201 Directory created successfully`

```json
{
  "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"
}
```

---
Original source: https://buddy.works/docs/api/sandboxes/create-directory