PUT
/
filesystem
/
{path}
curl --request PUT \
  --url https://run.blaxel.ai/{workspace_id}/sandboxes/{sandbox_id}/filesystem/{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "content": "file contents here",
  "isDirectory": false,
  "permissions": "0644"
}'
{
  "message": "File created successfully",
  "path": "/path/to/file"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

path
string
required

File or directory path

Body

application/json

File or directory details

The body is of type object.

Response

200
application/json

Success message

The response is of type object.