Skip to main content
POST
/
v1
/
agents
/
sandboxes
/
{sandbox_id}
/
files
/
write
Write File
curl --request POST \
  --url https://api.gravixlayer.com/v1/agents/sandboxes/{sandbox_id}/files/write \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "path": "<string>",
  "content": "<string>"
}
'
{
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

API key authentication. Get your API key from the Gravix Layer Dashboard.

Path Parameters

sandbox_id
string
required

Sandbox ID

Body

application/json
path
string
required

Absolute path to the file inside the sandbox.

Example valid prefixes from your sandbox check: /root/ or /workspace/

content
string
required

Content to write to the file

Response

200 - application/json

File written

message
string