> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shinzo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Move Files

> Move or rename files and directories within an agent's workspace.

## Authentication

Requires JWT token or Platform API key.

<ParamField path="agentId" type="string" required>Agent UUID</ParamField>
<ParamField body="source" type="string" required>Source path in the workspace</ParamField>
<ParamField body="destination" type="string" required>Destination path in the workspace</ParamField>
<ParamField body="overwrite" type="boolean">Overwrite if the destination already exists</ParamField>

## Example Request

```bash theme={null}
curl -X POST "https://api.app.shinzo.ai/v1/agent/agt_abc123/filesystem/operations/move" \
  -H "Authorization: Bearer <jwt_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "operations": [
      {
        "source": "/workspace/old-name.txt",
        "destination": "/workspace/new-name.txt"
      },
      {
        "source": "/workspace/temp/data.json",
        "destination": "/workspace/data/data.json",
        "overwrite": true
      }
    ]
  }'
```

## Response

```json theme={null}
{
  "results": [
    {
      "source": "/workspace/old-name.txt",
      "destination": "/workspace/new-name.txt",
      "success": true
    },
    {
      "source": "/workspace/temp/data.json",
      "destination": "/workspace/data/data.json",
      "success": true
    }
  ]
}
```

When an operation fails, the `error` field describes the reason:

```json theme={null}
{
  "results": [
    {
      "source": "/workspace/missing.txt",
      "destination": "/workspace/moved.txt",
      "success": false,
      "error": "Source file not found"
    }
  ]
}
```

## Response Fields

| Field                   | Type    | Description                             |
| ----------------------- | ------- | --------------------------------------- |
| `results`               | array   | Results for each move operation         |
| `results[].source`      | string  | Source path                             |
| `results[].destination` | string  | Destination path                        |
| `results[].success`     | boolean | Whether the operation succeeded         |
| `results[].error`       | string  | Error message (present only on failure) |

## Status Codes

| Code  | Description                                                                   |
| ----- | ----------------------------------------------------------------------------- |
| `200` | Move operations completed (check individual results for per-operation status) |
| `400` | Invalid request body                                                          |
| `401` | Invalid authentication                                                        |
| `403` | Access denied                                                                 |
| `404` | Agent not found                                                               |
