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.
القائمة الحية لمنتجك ولـ api.ownfileshare.com هي مرجع الواجهة. تذكر الصحة والحساب والمجلدات والرفع والمشاركات والسلة والدفع وطلبات الترخيص وويب هوك خدمة الترخيص. ويب هوك المنتج وطلبات الملفات وغرفة التسليم موضحة أدناه. ليست مسارات REST إضافية.
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_…
أنشئ المفتاح من صفحة مفاتيح API بعد تسجيل الدخول. يظهر المفتاح الكامل مرة واحدة، ويُحفظ فقط مجموع SHA-256. أرسله في 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.
استبدل BASE بعنوان OwnFileShare. رابط مشاركة المجلد يعرض المجلد. رابط الملف ينزّل ذلك الملف داخل مشاركة المجلد نفسه.
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.
filename هو اسم الملف. relative_path قد يكون المجلد مثل Client/2026 أو المجلد مع اسم الملف نفسه. إذا كان آخر جزء اسم ملف مختلف يُرفض الطلب بـ ambiguous_path. GET /api/v1/usage يحتاج files:read. DELETE ينقل الملف أو المجلد إلى السلة أو يلغي المشاركة أو يلغي رفعًا مفتوحًا.
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.
الاستخدام يعيد used_bytes وquota_bytes (null عند عدم وجود حد) وunlimited وapp_used_bytes وapp_quota_bytes وapp_unlimited وfile_count وfolder_count. الرفع الذي يتجاوز حصة الحساب أو حد تخزين التطبيق يعيد 507 quota. القرص الممتلئ يعيد 507 storage_full. GET /api/v1/uploads يعرض الجلسات المفتوحة والمتوقفة والفاشلة. DELETE /api/v1/uploads/{id} يلغي واحدة. GET /api/v1/trash يعرض سلة هذا الحساب. DELETE /api/v1/trash بدون confirm=yes يعيد 422. DELETE /api/v1/trash?confirm=yes يفرغ السلة. DELETE على /api/v1/trash/files/{id} أو /trash/folders/{id} يحذف نهائيًا عنصر ذلك المالك من السلة. الرسائل تتبع Accept-Language وتسمّي الملف أو المجلد أو المشاركة.
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.
السكربتات النموذجية تمسح شجرة محلية، مثل عشرات الجيجابايت من الصور والفيديو. عنوان الأساس قد يتضمن /api/v1 أو بدونه. كرر --exclude، ومرر --files بمسار في كل سطر، واستخدم --min-age لتخطي ملف ما زال يُكتب. --idempotent يعامل الاسم المتخطى كنجاح. أعد الأمر نفسه بعد التوقف. الملفات المكتملة تُتخطى، والملف الناقص يتابع من bytes_received. الرد 429 يعني الانتظار حسب retry_after. يستطيع المدير رفع حد الرفع أو السماح بالعنوان من الإعدادات، متقدم.
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.
أول طلب من جلسة PowerShell جديدة قد يستغرق نحو 40 ثانية ثم تصبح الطلبات سريعة. التأخير من جهاز العميل، غالبًا IPv6 أو DNS. فعّل TLS 1.2 وفضّل IPv4 على ذلك الجهاز. الخادم لا يختار عائلة عنوان العميل.
[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.
ويب هوك المنتج صادر. يرسل OwnFileShare أحداث upload.completed وshare.downloaded وshare.expired إلى العنوان في الإعدادات، البريد. الترويسة هي X-OwnFileShare-Signature: sha256= مع HMAC-SHA256 لنص JSON الخام. الإرسال الفاشل يُحاول ثلاث مرات. هذا ليس POST /api/v1/paypal/webhook وليس POST /api/v1/webhook في خدمة الترخيص.
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.
طلب الملفات رابط في المتصفح على /r/{token}. الضيف يرفع إلى المجلد المحدد. الصفحة لا تنزّل المكتبة. لا يوجد مسار REST في المنتج ينشئ طلب ملفات.
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.
غرفة التسليم هي صفحة العميل على /s/{token}. الموافقة وطلب التعديلات يُرسلان إلى /s/{token}/decision. إيصالات التنزيل يقرأها المُرسل بعد الدخول من /shares/{id}/receipts. هذه مسارات المتصفح وليست مسارات مفتاح API.