On this page
share
Shares & Recycle Bin API
Public link generation, expiration, password hashing, and Trash recovery endpoints
The Shares and Recycle Bin endpoints handle safe accidental deletion recovery and secure link distribution to external users.
1. Public Shares
List Active Shares
GET/api/v1/shares
curl http://localhost:8866/api/v1/sharesCreate Share Link
POST/api/v1/shares
curl -X POST http://localhost:8866/api/v1/shares \
-H "Content-Type: application/json" \
-d '{
"root": "storage",
"path": "photos/event_2026",
"password": "OptionalAccessPassword",
"expires_at": "2026-10-01T00:00:00Z",
"allow_download": true
}'Response (200 OK)
{
"id": "e891c109-c124-4f4a-8d19-4829104bc123",
"token": "e891c109-c124-4f4a-8d19-4829104bc123",
"root_name": "storage",
"path": "photos/event_2026",
"is_dir": true,
"has_password": true,
"expires_at": "2026-10-01T00:00:00Z"
}Access Public Share (No Auth Required)
GET/api/v1/public/share/{token}
curl http://localhost:8866/api/v1/public/share/e891c109-c124-4f4a-8d19-4829104bc123Revoke / Delete Share
DELETE/api/v1/shares
curl -X DELETE "http://localhost:8866/api/v1/shares?id=e891c109-c124-4f4a-8d19-4829104bc123"2. Recycle Bin (Trash)
List Trashed Items
GET/api/v1/trash/list
curl http://localhost:8866/api/v1/trash/listResponse (200 OK)
[
{
"id": "t-84920412",
"name": "draft.txt",
"original_path": "documents/draft.txt",
"root_name": "storage",
"deleted_at": 1726300000,
"size": 1420
}
]Restore Trashed Item
Moves the quarantined item back to its original location:
POST/api/v1/trash/restore
curl -X POST http://localhost:8866/api/v1/trash/restore \
-H "Content-Type: application/json" \
-d '{"id":"t-84920412"}'Purge Single Item
Permanently deletes the specified trashed item:
DELETE/api/v1/trash/purge
curl -X DELETE http://localhost:8866/api/v1/trash/purge \
-H "Content-Type: application/json" \
-d '{"id":"t-84920412"}'Empty Entire Trash Bin
Permanently unlinks all quarantined items in .kv_trash/:
DELETE/api/v1/trash/empty
curl -X DELETE http://localhost:8866/api/v1/trash/empty