API Documentation

1. Get an API key

Open API Keys page (login required), click Generate and copy the key. It is shown only once and looks like:

vxc_a1b2c3d4e5...

All requests must include the header:

Authorization: Bearer vxc_YOUR_KEY

Limit: 10 keys per account. A key grants full access to that account's storage within its quota.

2. Endpoints

GET /api/v1/me

Account info: email, quota usage.

curl https://vertex-drive.duckdns.org/api/v1/me \
  -H "Authorization: Bearer vxc_YOUR_KEY"
{
  "email": "user@gmail.com",
  "quota": { "used": 123456, "total": 16106127360 }
}

GET /api/v1/files

List folders and files. Query params (all optional):

  • folderId — list inside a folder
  • trash=1 — trash contents
  • shared=1 — shared items only
curl "https://vertex-drive.duckdns.org/api/v1/files?folderId=ID" \
  -H "Authorization: Bearer vxc_YOUR_KEY"
{
  "folders": [ { "id": "...", "name": "Docs", "parentId": null } ],
  "files":   [ { "id": "...", "name": "a.zip", "size": 1024,
                 "type": "application/zip", "folderId": null } ],
  "quota":   { "used": 1024, "total": 16106127360 }
}

POST /api/v1/upload?name=NAME

Upload one file. Request body = raw file bytes. Optional: &folderId=, &type= MIME.

curl -X POST "https://vertex-drive.duckdns.org/api/v1/upload?name=photo.jpg" \
  -H "Authorization: Bearer vxc_YOUR_KEY" \
  --data-binary @photo.jpg

Returns 201 with { "id", "name", "size" }. Duplicate names get suffix (1), (2)… Quota exceeded → 403.

GET /api/v1/download?id=ID

Download a file. If ID is a folder — returns a ZIP archive of it.

curl "https://vertex-drive.duckdns.org/api/v1/download?id=FILE_ID" \
  -H "Authorization: Bearer vxc_YOUR_KEY" -o file.bin

POST /api/v1/files

Create a folder or an empty text file (JSON body):

{ "name": "New Folder", "isFolder": true }
{ "name": "note.txt" }

PATCH /api/v1/files

Rename / move / trash (JSON body, fields optional):

{ "id": "...", "name": "renamed.zip" }     // rename
{ "id": "...", "folderId": "FOLDER_ID" }  // move ("" = root)
{ "id": "...", "trashed": true }          // to trash (false = restore)

DELETE /api/v1/files?id=ID

Move to trash. Add &permanent=1 to delete forever (folders — with all contents, quota recalculated).

3. Errors

CodeMeaning
400Bad request / invalid name
401Missing or invalid token
403Quota exceeded
404File or folder not found
429Too many requests