Skip to main content
POST
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
files
/
{path}
Create File
curl --request POST \
  --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>",
  "overwrite": true
}
'

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
File content
encoding
string
default:"utf-8"
Content encoding (utf-8 or base64)
overwrite
boolean
Overwrite if file already exists at the specified path

Example Request

curl -X POST "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/files/workspace/data/output.txt" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Hello, World!",
    "encoding": "utf-8",
    "permissions": "644"
  }'

Response

{
  "path": "/workspace/data/output.txt",
  "size": 13,
  "created_at": "2025-01-20T10:00:00Z"
}

Response Fields

FieldTypeDescription
pathstringAbsolute path of the created file
sizenumberFile size in bytes
created_atstringCreation timestamp (ISO 8601)

Status Codes

CodeDescription
201File created successfully
400Invalid request body
401Invalid authentication
403Access denied
404Agent not found
409File already exists at the specified path