Skip to main content
Create a directory in the sandbox filesystem.
curl -X POST https://api.gravixlayer.com/v1/agents/sandboxes/{sandbox_id}/files/mkdir \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/home/user/new_folder"
  }'

Request Parameters

ParameterTypeRequiredDescription
pathstringYesDirectory path to create

Response

{
  "message": "Directory created successfully",
  "path": "/home/user/new_folder"
}

Response Fields

FieldTypeDescription
messagestringSuccess message
pathstringPath of the created directory

Example: Create Nested Directories

curl -X POST https://api.gravixlayer.com/v1/agents/sandboxes/{sandbox_id}/files/mkdir \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/home/user/projects/data/output"
  }'

Directory Structure

Common directory patterns:
  • /home/user/data/ - Data files
  • /home/user/output/ - Generated output
  • /home/user/temp/ - Temporary files
  • /home/user/projects/ - Project files

Next Steps