Language

BuncitDrive API

Integrate file uploads, downloads, and sharing directly into your applications.

Authentication

All API requests require a Bearer token. Generate your token from the Settings page.

Authorization: Bearer YOUR_API_TOKEN

Base URL

https://buncitdrive.web.id/api/v1

Endpoints

GET /developer/files

List all files owned by the authenticated user.

curl -X GET https://buncitdrive.web.id/api/v1/developer/files \ -H "Authorization: Bearer YOUR_API_TOKEN"
POST /developer/files

Upload a new file.

curl -X POST https://buncitdrive.web.id/api/v1/developer/files \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -F "file=@/path/to/file.zip" \ -F "name=My File" \ -F "visibility=private"
POST /developer/files/remote

Upload a file from a remote URL.

curl -X POST https://buncitdrive.web.id/api/v1/developer/files/remote \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"link":"https://example.com/file.zip","name":"Remote File","visibility":"private"}'
GET /developer/files/{id}

Get detailed information about a file.

curl -X GET https://buncitdrive.web.id/api/v1/developer/files/123 \ -H "Authorization: Bearer YOUR_API_TOKEN"
PUT /developer/files/{id}

Rename a file or change its visibility.

curl -X PUT https://buncitdrive.web.id/api/v1/developer/files/123 \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"name":"New Name.zip","visibility":"public"}'
DELETE /developer/files/{id}

Delete a file.

curl -X DELETE https://buncitdrive.web.id/api/v1/developer/files/123 \ -H "Authorization: Bearer YOUR_API_TOKEN"
GET /developer/files/{id}/download

Download a file.

curl -L -O -J https://buncitdrive.web.id/api/v1/developer/files/123/download \ -H "Authorization: Bearer YOUR_API_TOKEN"
POST /developer/files/{id}/share

Create a public share link for a file.

curl -X POST https://buncitdrive.web.id/api/v1/developer/files/123/share \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"password":"secret","expires_at":"2026-12-31 23:59:59"}'

Response Format

Successful responses follow this format:

{ "success": true, "file": { "id": 123, "name": "file.zip", "file_name": "file.zip", "size": 1234567, "human_readable_size": "1.18 MB", "mime_type": "application/zip", "visibility": "private", "download_url": "https://buncitdrive.web.id/api/v1/developer/files/123/download", "stream_url": "https://buncitdrive.web.id/files/123/stream", "created_at": "2026-06-29T00:00:00.000000Z", "updated_at": "2026-06-29T00:00:00.000000Z" } }