API Documentation

Integrate SendFiles.Online into your applications with our REST API.

Overview

The SendFiles.Online API allows you to programmatically create file transfers, upload files, and manage your transfers. All API access requires a Business or Enterprise plan.

Base URL: https://sendfiles.online/api/v1/

All requests must be made over HTTPS. The API accepts JSON request bodies and returns JSON responses.

Authentication

Authenticate using your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Get your API key from your account dashboard. Keep your API key secret - don't share it or commit it to version control.

Security: Never expose your API key in client-side code. Make API calls from your server.

Create Transfer

Create a new transfer to get an upload URL.

POST /api/v1/transfers/

Request Body
ParameterTypeDescription
messagestringOptional message for recipients
passwordstringOptional password protection
expires_daysintegerDays until expiration (default: plan limit)
notify_emailstringEmail to notify on download
Example Request
curl -X POST https://sendfiles.online/api/v1/transfers/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"message": "Project files", "password": "secret123"}'
Response
{ "id": "550e8400-e29b-41d4-a716-446655440000", "short_id": "abc12345", "status": "uploading", "upload_url": "https://sendfiles.online/api/v1/transfers/550e8400.../upload/", "created_at": "2026-02-05T12:00:00Z", "expires_at": "2026-05-06T12:00:00Z" }

Upload File

Upload a file to an existing transfer. Use multipart/form-data.

POST /api/v1/transfers/{id}/upload/

Request Body (multipart/form-data)
ParameterTypeDescription
file *fileThe file to upload
Example Request
curl -X POST https://sendfiles.online/api/v1/transfers/550e8400.../upload/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "file=@/path/to/document.pdf"
Response
{ "id": "660f9500-f30c-52e5-b827-557766551111", "name": "document.pdf", "size": 1048576, "mime_type": "application/pdf" }

Upload multiple files by making multiple requests to this endpoint.

Finalize Transfer

Finalize a transfer after uploading all files. This generates the download link.

POST /api/v1/transfers/{id}/finalize/

Example Request
curl -X POST https://sendfiles.online/api/v1/transfers/550e8400.../finalize/ \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "id": "550e8400-e29b-41d4-a716-446655440000", "short_id": "abc12345", "status": "ready", "download_url": "https://sendfiles.online/d/abc12345/", "files": [ {"name": "document.pdf", "size": 1048576} ], "total_size": 1048576, "download_count": 0, "expires_at": "2026-05-06T12:00:00Z" }

Get Transfer

Get details about a specific transfer.

GET /api/v1/transfers/{id}/

Example Request
curl https://sendfiles.online/api/v1/transfers/550e8400.../ \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "id": "550e8400-e29b-41d4-a716-446655440000", "short_id": "abc12345", "status": "ready", "download_url": "https://sendfiles.online/d/abc12345/", "files": [...], "total_size": 1048576, "download_count": 5, "created_at": "2026-02-05T12:00:00Z", "expires_at": "2026-05-06T12:00:00Z" }

List Transfers

List all your transfers with pagination.

GET /api/v1/transfers/

Query Parameters
ParameterTypeDescription
pageintegerPage number (default: 1)
per_pageintegerItems per page (default: 20, max: 100)
statusstringFilter by status: uploading, ready, expired
Response
{ "transfers": [...], "total": 42, "page": 1, "per_page": 20, "pages": 3 }

Delete Transfer

Delete a transfer and all its files.

DELETE /api/v1/transfers/{id}/

Example Request
curl -X DELETE https://sendfiles.online/api/v1/transfers/550e8400.../ \ -H "Authorization: Bearer YOUR_API_KEY"
Response
{ "success": true, "message": "Transfer deleted" }

Webhooks

Receive notifications when events occur. Configure webhooks in your account settings.

Events
EventDescription
transfer.readyTransfer finalized and ready for download
transfer.downloadedSomeone downloaded the transfer
transfer.expiredTransfer has expired
Webhook Payload
{ "event": "transfer.downloaded", "timestamp": "2026-02-05T14:30:00Z", "data": { "transfer_id": "550e8400...", "short_id": "abc12345", "download_count": 1, "downloader_ip": "203.0.113.1" } }

Error Handling

The API uses standard HTTP status codes. Errors include a JSON body with details.

CodeDescription
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Transfer doesn't exist
413Payload Too Large - File exceeds plan limit
429Too Many Requests - Rate limited
500Server Error - Something went wrong
Error Response
{ "error": "invalid_parameter", "message": "expires_days must be between 1 and 90", "field": "expires_days" }

Rate Limits

API requests are rate limited per API key:

PlanRequests/minuteRequests/day
Business6010,000
Enterprise300100,000

Rate limit headers are included in responses:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1707145200

SDKs & Libraries

Official SDKs for popular languages:

Python
pip install sendfiles
Node.js
npm install sendfiles
PHP
composer require sendfiles/sdk
Python Example
from sendfiles import SendFilesClient client = SendFilesClient("YOUR_API_KEY") # Create and upload transfer = client.create_transfer(message="Project files") transfer.upload("/path/to/file.zip") transfer.finalize() print(f"Download URL: {transfer.download_url}")
Need Help?

Questions about the API? Contact our developer support or email api@sendfiles.online.