Skip to main content
POST
https://api.app.shinzo.ai
/
v1
/
agent
/
{agentId}
/
filesystem
/
operations
/
copy
Copy Files
curl --request POST \
  --url https://api.app.shinzo.ai/v1/agent/{agentId}/filesystem/operations/copy \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "source": "<string>",
  "destination": "<string>",
  "overwrite": true
}
'

Authentication

Requires JWT token or Platform API key.
agentId
string
required
Agent UUID
source
string
required
Source path in the workspace
destination
string
required
Destination path in the workspace
overwrite
boolean
Overwrite if the destination already exists

Example Request

curl -X POST "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/operations/copy" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {
        "source": "/workspace/config.json",
        "destination": "/workspace/config.backup.json",
        "overwrite": false
      },
      {
        "source": "/workspace/src",
        "destination": "/workspace/src-backup"
      }
    ]
  }'

Response

{
  "results": [
    {
      "source": "/workspace/config.json",
      "destination": "/workspace/config.backup.json",
      "success": true
    },
    {
      "source": "/workspace/src",
      "destination": "/workspace/src-backup",
      "success": true
    }
  ]
}
When an operation fails, the error field describes the reason:
{
  "results": [
    {
      "source": "/workspace/missing.txt",
      "destination": "/workspace/copy.txt",
      "success": false,
      "error": "Source file not found"
    }
  ]
}

Response Fields

FieldTypeDescription
resultsarrayResults for each copy operation
results[].sourcestringSource path
results[].destinationstringDestination path
results[].successbooleanWhether the operation succeeded
results[].errorstringError message (present only on failure)

Status Codes

CodeDescription
200Copy operations completed (check individual results for per-operation status)
400Invalid request body
401Invalid authentication
403Access denied
404Agent not found