API Reference
The 5sync API is a RESTful interface for managing your files, links, and account programmatically. All requests are made to the following base URL:
All responses are returned as JSON. Authentication is required for every request.
Authentication
Authenticate by including your API key in the Authorization header as a Bearer token. API keys start with the prefix sk_5s_.
You can generate and manage API keys from Settings → Developer → API Keys in your 5sync dashboard. Keep your keys secret and never expose them in client-side code.
Rate Limits
API rate limits depend on your plan. Limits are applied per API key on a rolling one-hour window.
| Plan | Requests / Hour |
|---|---|
| Starter | 60 |
| Plus | 600 |
| Business | 6,000 |
Rate limit status is returned in every response via headers:
X-RateLimit-Limit— Maximum requests per hourX-RateLimit-Remaining— Requests remaining in current windowX-RateLimit-Reset— Unix timestamp when window resets
When you exceed the limit, the API returns 429 Too Many Requests:
PUT /v1/files
Upload a single file. For files larger than 100 MB, use the Multipart Upload endpoint instead.
| Parameter | Type | Required | Description |
|---|---|---|---|
file |
File | required | The file to upload (multipart/form-data) |
path |
string | optional | Destination path (e.g. /documents) |
encrypt |
boolean | optional | Enable encryption. Default: true |
POST /v1/files/multipart
Upload large files in chunks using a three-step process: initialize, upload parts, then complete.
Step 1 — Initialize
POST /v1/files/multipart/init
| Parameter | Type | Required | Description |
|---|---|---|---|
filename |
string | required | Name of the file being uploaded |
size |
integer | required | Total file size in bytes |
parts |
integer | required | Number of chunks to split the upload into |
Step 2 — Upload Part
PUT /v1/files/multipart/:upload_id/:part
Send the binary data for each chunk. The :part parameter is a zero-based index.
Step 3 — Complete
POST /v1/files/multipart/:upload_id/complete
Once all parts are uploaded, finalize the multipart upload. The response returns the full file object.
GET /v1/files/:id
Retrieve metadata for a single file, or download the file contents.
| Parameter | Type | Required | Description |
|---|---|---|---|
download |
boolean | optional | If true, returns the file binary instead of metadata |
GET /v1/files
List files in your account with optional filtering, pagination, and sorting.
| Parameter | Type | Required | Description |
|---|---|---|---|
path |
string | optional | Filter by directory path |
page |
integer | optional | Page number (default: 1) |
limit |
integer | optional | Items per page, max 100 (default: 20) |
order_by |
string | optional | Sort field: name, created, size |
DELETE /v1/files/:id
Permanently delete a file. This action cannot be undone.
POST /v1/links
Create a shareable link for a file. Optionally add password protection, expiry, and download controls.
| Parameter | Type | Required | Description |
|---|---|---|---|
file_id |
string | required | ID of the file to share |
password |
string | optional | Password-protect the link |
ttl_hours |
integer | optional | Hours until the link expires |
allow_download |
boolean | optional | Allow file download via the link. Default: true |
GET /v1/changes
Retrieve a feed of file events (created, modified, deleted) since a given timestamp. Useful for building sync clients.
| Parameter | Type | Required | Description |
|---|---|---|---|
since |
string | required | ISO 8601 timestamp to fetch changes from |
path |
string | optional | Filter changes to a specific directory path |
Errors
The API uses standard HTTP status codes. All error responses follow a consistent format:
| Status | Type | Description |
|---|---|---|
400 |
bad_request | The request was malformed or missing required parameters |
401 |
unauthorized | Invalid or missing API key |
403 |
forbidden | API key does not have permission for this action |
404 |
not_found | The requested resource does not exist |
429 |
rate_limit_exceeded | Too many requests — see Rate Limits |
500 |
internal_error | Unexpected server error — please retry or contact support |