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
}
'Agent Filesystem
Create File
Create a new file in an agent’s workspace.
POST
/
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.string
required
Agent UUID
string
required
File path within the agent workspace (wildcard segment)
string
required
File content
string
default:"utf-8"
Content encoding (
utf-8 or base64)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
| Field | Type | Description |
|---|---|---|
path | string | Absolute path of the created file |
size | number | File size in bytes |
created_at | string | Creation timestamp (ISO 8601) |
Status Codes
| Code | Description |
|---|---|
201 | File created successfully |
400 | Invalid request body |
401 | Invalid authentication |
403 | Access denied |
404 | Agent not found |
409 | File already exists at the specified path |

