Docs

Every endpoint

The live list for your install and for api.ownfileshare.com is the API reference. It names health, account, folders, uploads, shares, trash, checkout, license requests, and the license-service webhooks. Product webhooks, file requests, and Delivery Room are described below. They are not extra REST routes.

https://api.ownfileshare.com/reference

Upload API

واجهة الرفع

Create a key from API keys after you sign in. The full key is shown once and only its SHA-256 hash is stored. Send it as Authorization: Bearer fsk_…

Calls

Replace BASE with your OwnFileShare address. A folder share link lists that folder. A file link downloads that file inside the same folder share.

curl -s -X POST "$BASE/api/v1/folders" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"path":"Client/2026"}'

curl -s "$BASE/api/v1/folders?path=Client/2026" \
  -H "Authorization: Bearer $KEY"

curl -s -X POST "$BASE/api/v1/uploads" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"filename":"photo.jpg","relative_path":"Client/2026/photo.jpg","total_size":12345,"client_key":"0123456789abcdef0123456789abcdef"}'

curl -s -X PUT "$BASE/api/v1/uploads/UPLOAD_ID?index=0&offset=0" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/octet-stream" \
  --data-binary @photo.jpg

curl -s -X POST "$BASE/api/v1/uploads/UPLOAD_ID/complete" \
  -H "Authorization: Bearer $KEY"

curl -s -X POST "$BASE/api/v1/shares" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"path":"Client/2026"}'

curl -s "$BASE/api/v1/uploads" -H "Authorization: Bearer $KEY"
curl -s -X DELETE "$BASE/api/v1/uploads/UPLOAD_ID" -H "Authorization: Bearer $KEY"
curl -s "$BASE/api/v1/usage" -H "Authorization: Bearer $KEY"

curl -s -X DELETE "$BASE/api/v1/files/FILE_ID" -H "Authorization: Bearer $KEY" -H "Accept-Language: en"
curl -s -X DELETE "$BASE/api/v1/folders/FOLDER_ID" -H "Authorization: Bearer $KEY" -H "Accept-Language: ar"
curl -s -X DELETE "$BASE/api/v1/shares/SHARE_ID" -H "Authorization: Bearer $KEY"
curl -s "$BASE/api/v1/trash" -H "Authorization: Bearer $KEY"
curl -s -X DELETE "$BASE/api/v1/trash?confirm=yes" -H "Authorization: Bearer $KEY"
curl -s -X DELETE "$BASE/api/v1/trash/files/FILE_ID" -H "Authorization: Bearer $KEY"
curl -s -X DELETE "$BASE/api/v1/trash/folders/FOLDER_ID" -H "Authorization: Bearer $KEY"
$Headers = @{ Authorization = "Bearer $Key" }
Invoke-RestMethod -Method Post -Uri "$Base/api/v1/folders" -Headers $Headers `
  -ContentType "application/json" -Body '{"path":"Client/2026"}'

filename is the file name. relative_path may be the folder, such as Client/2026, or the folder plus that same file name. A last segment that looks like a different file is rejected as ambiguous_path. GET /api/v1/usage needs files:read. DELETE moves a file or folder to trash, revokes a share, or cancels an open upload.

Usage and delete

Usage returns used_bytes, quota_bytes (null when unlimited), unlimited, app_used_bytes, app_quota_bytes, app_unlimited, file_count, and folder_count. An upload that exceeds the account quota or the app storage limit returns 507 quota. A full disk returns 507 storage_full. GET /api/v1/uploads lists open, paused, and failed sessions. DELETE /api/v1/uploads/{id} cancels one. GET /api/v1/trash lists this account’s trash. DELETE /api/v1/trash without confirm=yes returns 422. DELETE /api/v1/trash?confirm=yes empties it. DELETE /api/v1/trash/files/{id} or /trash/folders/{id} permanently removes that owner's trashed item. Messages follow Accept-Language and name the file, folder, or share.

Resume a large folder

The sample scripts walk a local tree, such as tens of gigabytes of photos and videos. The base URL may include /api/v1 or omit it. Repeat --exclude, pass --files with one path per line, and use --min-age to skip a file that is still being written. --idempotent treats a skipped name as success. Run the same command again after a stop. Completed files are skipped. A partial file continues from bytes_received. HTTP 429 means wait for retry_after. An administrator can raise the upload rate or allowlist the address under Settings, Advanced.

The first request from a new PowerShell session can take about 40 seconds, then later requests are fast. That delay is on the client, usually IPv6 or DNS. On that machine set TLS 1.2 and prefer IPv4. The server cannot choose the client address family.

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
pwsh ./tools/fileshare-upload.ps1 -BaseUrl "https://files.your-domain.com" -Token "fsk_..." -LocalPath "D:\photos" -RemotePath "Archive/2026" -Idempotent
curl --ipv4 -sS "https://files.your-domain.com/api/v1/health"
./tools/fileshare-upload.sh --exclude "*.tmp" --min-age 30 --idempotent "https://files.your-domain.com" "fsk_..." "/data/photos" "Archive/2026"

Webhooks, file requests, and Delivery Room

Product webhooks are outbound. OwnFileShare posts upload.completed, share.downloaded, and share.expired to the URL in Settings, Email. The header is X-OwnFileShare-Signature: sha256= and an HMAC-SHA256 of the raw JSON. A failed post is tried three times. This is not POST /api/v1/paypal/webhook and not POST /api/v1/webhook on the license service.

A file request is a browser link at /r/{token}. The guest can upload into the chosen folder. The page does not download the library. There is no product REST route that creates a file request.

Delivery Room is the client page at /s/{token}. Approve and Request changes post to /s/{token}/decision. Download receipts are read by the signed-in sender at /shares/{id}/receipts. These are browser routes, not API keys routes.