Create a directory in the sandbox
Call Create sandbox first and replace sbx_123 with its returned sandboxID.
POST
/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir● SupportedRequest parameters
sandbox_idstringrequiredpath: Sandbox ID returned by sandboxes.create or sandboxes.list.
pathstringrequiredquery: File or directory path inside the sandbox; relative paths use the user's home directory.
Returns
200
Errors follow the E2B format — see error codes
Request
curl
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
curl -X POST "https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/files:makeDir?path=/tmp/docs-files" \
-H "X-API-Key: $PRAXIS_API_KEY"Python
# Call Create sandbox first and replace sbx_123 with its returned sandboxID.
import requests
api_key = "$PRAXIS_API_KEY"
# Call /sandbox/v1 directly over HTTP.
resp = requests.post(
"https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/files:makeDir?path=/tmp/docs-files",
headers={"X-API-Key": api_key},
)
print(resp.status_code, resp.text)TypeScript
// Call Create sandbox first and replace sbx_123 with its returned sandboxID.
const apiKey = "$PRAXIS_API_KEY";
// Call /sandbox/v1 directly over HTTP.
const resp = await fetch(`https://api.deepraxis.com/sandbox/v1/sandboxes/sbx_123/files:makeDir?path=/tmp/docs-files`, {
method: "POST",
headers: { "X-API-Key": apiKey },
});
console.log(resp.status, await resp.text());Response 200
trueResponse
HTTP 200
Operation completed
application/json
| Name | Type | Description |
|---|---|---|
| $ | boolean | True if created; false if the path already exists. |