curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/copy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination_path": "backups/report-copy.pdf",
"destination_drive_id": "drv_def456"
}'
{
"id": "file_new123",
"drive_id": "drv_def456",
"path": "backups/report-copy.pdf",
"filename": "report-copy.pdf",
"mime_type": "application/pdf",
"size": 24576,
"content_hash": "sha256:abcdef1234567890",
"content_preview": null,
"tags": ["report", "2026"],
"metadata": { "author": "Jane Doe" },
"created_at": "2026-03-19T09:00:00Z",
"updated_at": "2026-03-19T09:00:00Z"
}
Files
Copy File
Create a copy of a file, optionally to a different drive.
POST
/
v0
/
files
/
{id}
/
copy
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/copy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination_path": "backups/report-copy.pdf",
"destination_drive_id": "drv_def456"
}'
{
"id": "file_new123",
"drive_id": "drv_def456",
"path": "backups/report-copy.pdf",
"filename": "report-copy.pdf",
"mime_type": "application/pdf",
"size": 24576,
"content_hash": "sha256:abcdef1234567890",
"content_preview": null,
"tags": ["report", "2026"],
"metadata": { "author": "Jane Doe" },
"created_at": "2026-03-19T09:00:00Z",
"updated_at": "2026-03-19T09:00:00Z"
}
Path Parameters
string
required
The unique identifier of the file to copy.
Request Body
string
required
The path for the new copy of the file.
string
The ID of the drive to copy the file to. Defaults to the same drive as the source file.
curl -X POST https://api.getagentdrive.com/v0/files/file_xyz789/copy \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"destination_path": "backups/report-copy.pdf",
"destination_drive_id": "drv_def456"
}'
{
"id": "file_new123",
"drive_id": "drv_def456",
"path": "backups/report-copy.pdf",
"filename": "report-copy.pdf",
"mime_type": "application/pdf",
"size": 24576,
"content_hash": "sha256:abcdef1234567890",
"content_preview": null,
"tags": ["report", "2026"],
"metadata": { "author": "Jane Doe" },
"created_at": "2026-03-19T09:00:00Z",
"updated_at": "2026-03-19T09:00:00Z"
}
