BoSFiles
API

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 Pro plan and above.

Base URL https://games22.fun/api/v1

Authentication

Use your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key in Settings → API.

Endpoints

POST /files/upload
Upload a file
Request
curl -X POST https://games22.fun/api/v1/files/upload \
  -H "Authorization: Bearer $BOSX_KEY" \
  -F "file=@report.pdf"
Response
{
  "success": true,
  "file_id": 1042,
  "public_link": "https://games22.fun/download/a1b2c3d4",
  "size": 2481920,
  "filename": "report.pdf"
}
GET /files
List files
Request
curl https://games22.fun/api/v1/files?page=1&limit=50 \
  -H "Authorization: Bearer $BOSX_KEY"
Response
{
  "success": true,
  "files": [ ... ],
  "pagination": { "page": 1, "limit": 50, "total": 128, "pages": 3 }
}
GET /files/{file_id}
Get file information
Request
curl https://games22.fun/api/v1/files/1042 \
  -H "Authorization: Bearer $BOSX_KEY"
Response
{
  "success": true,
  "file": {
    "file_id": 1042,
    "filename": "report.pdf",
    "size": 2481920,
    "upload_date": "2026-07-29 10:30:00",
    "download_count": 42,
    "public_link": "https://games22.fun/download/a1b2c3d4"
  }
}
DELETE /files/{file_id}
Delete a file
Request
curl -X DELETE https://games22.fun/api/v1/files/1042 \
  -H "Authorization: Bearer $BOSX_KEY"
Response
{ "success": true, "message": "File deleted successfully" }
GET /stats
Get account statistics
Request
curl https://games22.fun/api/v1/stats \
  -H "Authorization: Bearer $BOSX_KEY"
Response
{
  "success": true,
  "stats": { "total_files": 128, "total_size": 5368709120 },
  "limits": { "max_file_size": 5368709120, "daily_uploads": 500 },
  "plan": "pro"
}

Request examples

Copy the example for your language and drop in your own key.

# Upload a file
curl -X POST https://games22.fun/api/v1/files/upload \
  -H "Authorization: Bearer $BOSX_KEY" \
  -F "file=@report.pdf"

Rate Limits

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

Error Codes

CodeDescription
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

Need help with the API?

Write to us — we will help with the integration.