The Files App API is organized around REST. JSON is returned by all responses, including errors.
All API requests must be authenticated and made over HTTPS. Requests made over plain HTTP will be rejected. All responses are returned in JSON format.
Authenticate your API requests by including your API key in the Authorization header.
API keys can be generated in your dashboard under Settings → API Keys. Keep your keys secure — do not share them in client-side code.
API requests are rate limited per API key.
| Plan | Limit |
|---|---|
| Free | 100 req/hour |
| Pro | 1,000 req/hour |
| Team | 10,000 req/hour |
Rate limit information is included in the response headers of every API request:
X-RateLimit-Limit — Maximum requests per hourX-RateLimit-Remaining — Requests remaining in current windowX-RateLimit-Reset — Unix timestamp when the limit resetsIf you exceed the rate limit, you will receive a 429 response:
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please retry after 2025-01-15T11:00:00Z."
}
}Upload a file. Files are encrypted server-side by default.
| Name | Type | Required | Description |
|---|---|---|---|
file |
File | Yes | The file to upload (multipart/form-data) |
folder_id |
string | No | Target folder ID |
encrypt |
boolean | No | Enable encryption (default: true) |
curl -X POST https://files-app.com/api/v2/upload \ -H "Authorization: Bearer sk_live_..." \ -F "file=@document.pdf" \ -F "encrypt=true"
{
"id": "file_abc123",
"name": "document.pdf",
"size": 2048576,
"encrypted": true,
"created_at": "2025-01-15T10:30:00Z"
}Upload large files in chunks. Three-step process: initialize, upload chunks, complete.
POST /api/v2/chunks/init
| Name | Type | Required | Description |
|---|---|---|---|
filename |
string | Yes | Name of the file being uploaded |
total_size |
integer | Yes | Total file size in bytes |
total_chunks |
integer | Yes | Total number of chunks |
curl -X POST https://files-app.com/api/v2/chunks/init \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"filename": "large-video.mp4", "total_size": 524288000, "total_chunks": 100}'{
"upload_id": "upl_xyz789",
"chunk_size": 5242880,
"expires_at": "2025-01-15T11:30:00Z"
}POST /api/v2/chunks
| Name | Type | Required | Description |
|---|---|---|---|
upload_id |
string | Yes | Upload session ID from init step |
chunk_index |
integer | Yes | Zero-based index of this chunk |
data |
binary | Yes | Chunk binary data (multipart/form-data) |
curl -X POST https://files-app.com/api/v2/chunks \ -H "Authorization: Bearer sk_live_..." \ -F "upload_id=upl_xyz789" \ -F "chunk_index=0" \ -F "data=@chunk_000"
{
"chunk_index": 0,
"received": true
}POST /api/v2/chunks/complete
| Name | Type | Required | Description |
|---|---|---|---|
upload_id |
string | Yes | Upload session ID from init step |
curl -X POST https://files-app.com/api/v2/chunks/complete \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"upload_id": "upl_xyz789"}'{
"id": "file_abc123",
"name": "large-video.mp4",
"size": 524288000,
"encrypted": true,
"created_at": "2025-01-15T10:30:00Z"
}Retrieve file metadata or download the file.
| Name | Type | Required | Description |
|---|---|---|---|
download |
boolean | No | Set to true to download the file binary |
curl https://files-app.com/api/v2/files/file_abc123 \ -H "Authorization: Bearer sk_live_..."
{
"id": "file_abc123",
"name": "document.pdf",
"size": 2048576,
"encrypted": true,
"mime_type": "application/pdf",
"created_at": "2025-01-15T10:30:00Z",
"updated_at": "2025-01-15T10:30:00Z"
}List all files in your account or a specific folder.
| Name | Type | Required | Description |
|---|---|---|---|
folder_id |
string | No | Filter by folder ID |
page |
integer | No | Page number (default: 1) |
per_page |
integer | No | Items per page (default: 20, max: 100) |
sort |
string | No | Sort by: name, size, created_at |
curl "https://files-app.com/api/v2/files?page=1&per_page=20&sort=created_at" \ -H "Authorization: Bearer sk_live_..."
{
"files": [
{
"id": "file_abc123",
"name": "document.pdf",
"size": 2048576,
"created_at": "2025-01-15T10:30:00Z"
}
],
"total": 142,
"page": 1,
"per_page": 20
}Permanently delete a file.
curl -X DELETE https://files-app.com/api/v2/files/file_abc123 \ -H "Authorization: Bearer sk_live_..."
{
"deleted": true
}Get file changes since a given timestamp. Used for client synchronization.
| Name | Type | Required | Description |
|---|---|---|---|
since |
string | Yes | ISO 8601 timestamp to fetch changes from |
folder_id |
string | No | Filter changes by folder ID |
curl "https://files-app.com/api/v2/sync?since=2025-01-15T10:00:00Z" \ -H "Authorization: Bearer sk_live_..."
{
"changes": [
{
"id": "file_abc123",
"action": "created",
"timestamp": "2025-01-15T10:30:00Z"
},
{
"id": "file_def456",
"action": "modified",
"timestamp": "2025-01-15T10:35:00Z"
}
],
"cursor": "cur_xyz",
"has_more": false
}Files App uses conventional HTTP response codes. Codes in the 2xx range indicate success, codes in the 4xx range indicate a client error, and codes in the 5xx range indicate a server error.
{
"error": {
"code": "invalid_api_key",
"message": "The API key provided is invalid or has been revoked."
}
}| Status | Code | Description |
|---|---|---|
| 400 | bad_request |
Invalid request parameters |
| 401 | unauthorized |
Missing or invalid API key |
| 403 | forbidden |
Insufficient permissions |
| 404 | not_found |
Resource not found |
| 413 | file_too_large |
File exceeds plan limit |
| 429 | rate_limited |
Too many requests |
| 500 | internal_error |
Internal server error |
Official client libraries are coming soon. In the meantime, community-maintained SDKs are available:
# pip install filesapp
from filesapp import Client
client = Client("sk_live_...")
file = client.upload("document.pdf")// npm install @filesapp/sdk
const FilesApp = require('@filesapp/sdk');
const client = new FilesApp('sk_live_...');
const file = await client.upload('./document.pdf');// go get github.com/filesapp/go-sdk
client := filesapp.NewClient("sk_live_...")
file, err := client.Upload("document.pdf")All SDKs are open source and available on GitHub.