Skip to main content
PUT
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
files
/
{path}
Update File
curl --request PUT \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/files/{path} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "content": "<string>",
  "encoding": "<string>"
}
'

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
path
string
required
File path within the agent workspace (wildcard segment)
content
string
required
New file content
encoding
string
default:"utf-8"
Content encoding (utf-8 or base64)

Example Request

curl -X PUT "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/files/workspace/config.json" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "{\"debug\": false, \"log_level\": \"warn\"}",
    "encoding": "utf-8"
  }'

Response

{
  "path": "/workspace/config.json",
  "size": 40,
  "updated_at": "2025-01-20T12:30:00Z"
}

Response Fields

FieldTypeDescription
pathstringAbsolute path of the updated file
sizenumberNew file size in bytes
updated_atstringUpdate timestamp (ISO 8601)

Status Codes

CodeDescription
200File updated successfully
400Invalid request body
401Invalid authentication
403Access denied
404Agent or file not found