curl -X POST https://api.getagentdrive.com/v0/files \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"drive_id": "drv_abc123",
"filename": "report.pdf",
"path": "documents/report.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf",
"metadata": { "author": "Jane Doe" },
"tags": ["report", "2026"]
}'
{
"id": "file_xyz789",
"drive_id": "drv_abc123",
"path": "documents/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-01-15T10:30:00Z"
}
Files
Upload File
Upload a file to a drive.
POST
/
v0
/
files
curl -X POST https://api.getagentdrive.com/v0/files \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"drive_id": "drv_abc123",
"filename": "report.pdf",
"path": "documents/report.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf",
"metadata": { "author": "Jane Doe" },
"tags": ["report", "2026"]
}'
{
"id": "file_xyz789",
"drive_id": "drv_abc123",
"path": "documents/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-01-15T10:30:00Z"
}
Request Body
curl -X POST https://api.getagentdrive.com/v0/files \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"drive_id": "drv_abc123",
"filename": "report.pdf",
"path": "documents/report.pdf",
"content": "JVBERi0xLjQK...",
"content_type": "application/pdf",
"metadata": { "author": "Jane Doe" },
"tags": ["report", "2026"]
}'
{
"id": "file_xyz789",
"drive_id": "drv_abc123",
"path": "documents/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-01-15T10:30:00Z"
}
