Skip to main content
POST
/
v0
/
files
/
{id}
/
move
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/move \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_path": "archive/2026/report.pdf"
  }'
{
  "id": "file_xyz789",
  "drive_id": "drv_abc123",
  "path": "archive/2026/report.pdf",
  "filename": "report.pdf",
  "mime_type": "application/pdf",
  "size": 24576,
  "content_hash": "sha256:abcdef1234567890",
  "content_preview": null,
  "tags": ["report", "2026"],
  "metadata": { "author": "Jane Doe" },
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-03-19T09:10:00Z"
}

Path Parameters

id
string
required
The unique identifier of the file to move.

Request Body

destination_path
string
required
The new path for the file.
destination_drive_id
string
The ID of the drive to move the file to. Defaults to the current drive.
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/move \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "destination_path": "archive/2026/report.pdf"
  }'
{
  "id": "file_xyz789",
  "drive_id": "drv_abc123",
  "path": "archive/2026/report.pdf",
  "filename": "report.pdf",
  "mime_type": "application/pdf",
  "size": 24576,
  "content_hash": "sha256:abcdef1234567890",
  "content_preview": null,
  "tags": ["report", "2026"],
  "metadata": { "author": "Jane Doe" },
  "created_at": "2026-01-15T10:30:00Z",
  "updated_at": "2026-03-19T09:10:00Z"
}

Response

Returns the updated file record. See Get File for the full response schema.