API Documentation

REST API for integrating BoS Files into your applications

About the API

The BoS Files API allows you to integrate file sharing functionality into your applications. The API is available for users with the <strong>Pro</strong> plan and above.

Base URL: https://download-1.bosx.net/api/v1

Authentication

Use your API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY" \
    https://download-1.bosx.net/api/v1/files

Get your API key in Settings → API.

Endpoints

POST /files/upload

Upload a file

curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@/path/to/file.pdf" \
  https://download-1.bosx.net/api/v1/files/upload

Response:

{
  "success": true,
  "file_id": 123,
  "public_link": "https://download-1.bosx.net/download/xyz789abc",
  "size": 1024000,
  "filename": "file.pdf"
}
GET /files

List files

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://download-1.bosx.net/api/v1/files?page=1&limit=50

Response:

{
  "success": true,
  "files": [...],
  "pagination": {"page": 1, "limit": 50, "total": 100, "pages": 2}
}
GET /files/{file_id}

Get file information

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://download-1.bosx.net/api/v1/files/123

Response:

{
  "success": true,
  "file": {
    "file_id": 123,
    "filename": "document.pdf",
    "size": 1024000,
    "upload_date": "2024-01-15 10:30:00",
    "download_count": 42,
    "public_link": "https://download-1.bosx.net/download/xyz789"
  }
}
DELETE /files/{file_id}

Delete a file

curl -X DELETE \
  -H "Authorization: Bearer YOUR_API_KEY" \
  https://download-1.bosx.net/api/v1/files/123

Response:

{"success": true, "message": "File deleted successfully"}
GET /stats

Get account statistics

curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://download-1.bosx.net/api/v1/stats

Response:

{
  "success": true,
  "stats": {"total_files": 50, "total_size": 1073741824, ...},
  "limits": {"max_file_size": 5368709120, "daily_uploads": 500, ...},
  "plan": "pro"
}

Rate Limits

Plan Requests per minute Requests per day
Pro 50 5,000
Business 100 10,000
Enterprise 1,000 100,000

Error Codes

Code Description
400 Bad request (missing required parameters)
401 Invalid or missing API key
403 Access denied (plan does not support API or limit exceeded)
404 Resource not found
429 Rate limit exceeded

SDKs & Libraries

Official SDKs for popular programming languages:

Python
pip install fileshare-sdk

JavaScript
npm install fileshare

PHP
composer require fileshare

Java
maven: fileshare-sdk

Need help with the API?

Our development team is ready to help with integration

Upgrade Plan Get API Key