API reference
Upload, list, share and sync files from your own scripts and back-office systems. Requests and responses are JSON over HTTPS, and every call has the same access as the account that owns the token.
https://syncxfiles.com/rest/2026-02
The date in the path is the API version. When we make a change that could break your code, we publish a new dated version and keep the previous one running for at least 12 months. This page describes version 2026-02.
The Python and JavaScript examples build on the setup in Authentication. They use the requests library and the built-in fetch of Node.js 18 or later.
Authentication
Every request needs a personal access token. Create one in the Syncx web app under Settings, Developer, Personal tokens. Pick the scopes it needs and an expiry date up to one year ahead. The token is shown only once, so keep it in a secret manager or an environment variable, never in code that runs in a browser.
Send the token in the Authorization header. Tokens start with sxf_pat_.
export SYNCX_TOKEN="sxf_pat_your_token"
curl https://syncxfiles.com/rest/2026-02/drives \
-H "Authorization: Bearer $SYNCX_TOKEN"
import os
import requests
API = "https://syncxfiles.com/rest/2026-02"
session = requests.Session()
session.headers["Authorization"] = f"Bearer {os.environ['SYNCX_TOKEN']}"
r = session.get(f"{API}/drives", timeout=30)
r.raise_for_status()
// Node.js 18 or later
const API = "https://syncxfiles.com/rest/2026-02";
const headers = { Authorization: `Bearer ${process.env.SYNCX_TOKEN}` };
const res = await fetch(`${API}/drives`, { headers });
if (!res.ok) throw new Error(`Syncx API: HTTP ${res.status}`);
Scopes
| Scope | Allows |
|---|---|
files.read | List drives and items, download files, read revisions and the change feed. |
files.write | Upload, rename, move and delete files and folders. |
shares.write | Create share links for items the token can read. |
A missing, expired or revoked token returns 401. A token without the scope an endpoint needs returns 403. On Team, admins can see and revoke every token in the admin console.
Conventions
- Request and response bodies are JSON in UTF-8. Send
Content-Type: application/jsonwith every body, except file parts. - Times are ISO 8601 strings in UTC, like
2026-10-09T08:14:52Z. Sizes are in bytes. - Every response has an
X-Request-Idheader. Quote it when you write to support.
Every ID starts with a prefix that tells you what it points to:
| Prefix | Object |
|---|---|
drv_ | Drive, personal or team |
itm_ | File or folder |
upl_ | Upload in progress |
rev_ | Earlier version of a file |
shr_ | Share link |
req_ | Request, for support and error reports |
Pagination
Endpoints that return lists send up to limit results and a next_cursor. Pass it back as cursor to get the next page. When next_cursor is null, you have everything. Cursors stay valid for 24 hours.
# Second page of the top level of your drive
curl -G https://syncxfiles.com/rest/2026-02/items \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-d parent=root \
-d cursor=c_2kPq7Xw9Ld
params = {"parent": "root", "limit": 200}
while True:
page = session.get(f"{API}/items", params=params, timeout=30).json()
for item in page["data"]:
print(item["type"], item["name"])
if page["next_cursor"] is None:
break
params["cursor"] = page["next_cursor"]
let cursor = null;
do {
const params = new URLSearchParams({ parent: "root", limit: "200" });
if (cursor) params.set("cursor", cursor);
const res = await fetch(`${API}/items?${params}`, { headers });
const page = await res.json();
for (const item of page.data) console.log(item.type, item.name);
cursor = page.next_cursor;
} while (cursor);
Rate limits
Limits are counted per token, per minute. Sending file parts counts like any other request.
| Plan | Requests a minute |
|---|---|
| Free | 60 |
| Plus | 300 |
| Team | 1,200 |
Every response tells you where you stand:
| Header | Meaning |
|---|---|
RateLimit-Limit | Requests allowed in the current minute. |
RateLimit-Remaining | Requests left in the current minute. |
RateLimit-Reset | Seconds until the count starts again. |
Over the limit, you get 429 Too Many Requests with a Retry-After header in seconds. Wait that long, then retry.
HTTP/1.1 429 Too Many Requests
Content-Type: application/problem+json
RateLimit-Limit: 300
RateLimit-Remaining: 0
RateLimit-Reset: 17
Retry-After: 17
{
"type": "https://syncxfiles.com/rest/errors/rate-limited",
"title": "Too many requests",
"status": 429,
"detail": "This token has used its 300 requests for this minute. Retry in 17 seconds.",
"request_id": "req_01JB8X7R4W2NP3"
}
Errors
Errors come as application/problem+json. The status code says what kind of error it is, detail explains this case in plain English, and request_id helps us find the request if you write to support.
{
"type": "https://syncxfiles.com/rest/errors/name-conflict",
"title": "An item with this name already exists",
"status": 409,
"detail": "The folder Contracts already has a file named act-2026-09.pdf.",
"request_id": "req_01JB8X4M2T9QK6"
}
| Status | When it happens |
|---|---|
400 | The request is malformed, for example invalid JSON or an unknown parameter. |
401 | The token is missing, expired or revoked. |
403 | The token lacks the scope, or you have no access to this item. |
404 | The item does not exist, or the token cannot see it. |
409 | The folder already has an item with this name. |
412 | The ETag in If-Match is out of date. Read the item again. |
413 | A part is larger than part_size, or the file does not fit in your storage. |
422 | The request is valid JSON but cannot be done, for example a checksum mismatch. |
429 | Too many requests. See Rate limits. |
500 | Something failed on our side. Retry with a growing delay. |
503 | Briefly unavailable, usually during maintenance. Retry after Retry-After. |
List drives
GET/drives
Returns the drives the token can see: your personal drive and, on Team, every team drive you are a member of. Sizes are in bytes.
Needs the files.read scope.
Parameters
This endpoint takes no parameters.
Example
curl https://syncxfiles.com/rest/2026-02/drives \
-H "Authorization: Bearer $SYNCX_TOKEN"
r = session.get(f"{API}/drives", timeout=30)
r.raise_for_status()
for drive in r.json()["data"]:
print(drive["id"], drive["name"], drive["used_bytes"])
const res = await fetch(`${API}/drives`, { headers });
const { data: drives } = await res.json();
{
"data": [
{
"id": "drv_7Hq2Lx9VmK",
"name": "My drive",
"type": "personal",
"quota_bytes": 1099511627776,
"used_bytes": 48213504211,
"created_at": "2024-03-18T06:42:10Z"
},
{
"id": "drv_Tm4cR8wNe2",
"name": "Accounting",
"type": "team",
"quota_bytes": 5497558138880,
"used_bytes": 912734118402,
"created_at": "2025-01-27T09:15:33Z"
}
]
}
List items in a folder
GET/items
Returns the files and folders directly inside one folder: folders first, then files, each sorted by name. Results come in pages, see Pagination.
Needs the files.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Query | ||
parent | string Required | Folder ID, or root for the top level of the drive. |
drive | string | Drive ID. Defaults to your personal drive. |
cursor | string | The next_cursor from the previous page. |
limit | integer | Items per page, 1-200. Default 50. |
Example
curl -G https://syncxfiles.com/rest/2026-02/items \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-d parent=root \
-d limit=100
r = session.get(
f"{API}/items",
params={"parent": "root", "limit": 100},
timeout=30,
)
items = r.json()["data"]
const params = new URLSearchParams({ parent: "root", limit: "100" });
const res = await fetch(`${API}/items?${params}`, { headers });
const { data: items, next_cursor } = await res.json();
{
"data": [
{
"id": "itm_3mZr8TqA1c",
"type": "folder",
"name": "Contracts",
"parent_id": "root",
"drive_id": "drv_7Hq2Lx9VmK",
"etag": "12-a07be3c1",
"modified_at": "2026-10-02T11:20:05Z"
},
{
"id": "itm_8Vd2Kp6Wq4",
"type": "file",
"name": "report-q3.pdf",
"parent_id": "root",
"drive_id": "drv_7Hq2Lx9VmK",
"size": 2482113,
"mime_type": "application/pdf",
"etag": "4-54ba90b1",
"modified_at": "2026-10-08T07:51:19Z"
}
],
"next_cursor": "c_2kPq7Xw9Ld"
}
Get an item
GET/items/{id}
Returns one file or folder. Files include their size, type, SHA-256 and current revision. The etag changes every time the item changes, and the same value comes back in the ETag response header.
Needs the files.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
id | string Required | Item ID. |
Example
curl https://syncxfiles.com/rest/2026-02/items/itm_8Vd2Kp6Wq4 \
-H "Authorization: Bearer $SYNCX_TOKEN"
r = session.get(f"{API}/items/itm_8Vd2Kp6Wq4", timeout=30)
item = r.json()
etag = r.headers["ETag"]
const res = await fetch(`${API}/items/itm_8Vd2Kp6Wq4`, { headers });
const item = await res.json();
const etag = res.headers.get("ETag");
{
"id": "itm_8Vd2Kp6Wq4",
"type": "file",
"name": "report-q3.pdf",
"parent_id": "root",
"drive_id": "drv_7Hq2Lx9VmK",
"size": 2482113,
"mime_type": "application/pdf",
"sha256": "54ba90b1d43ec38670997f1f3d23b5fd74d9a56fc981e206c814c3a4b1b2e6ee",
"etag": "4-54ba90b1",
"revision_id": "rev_9dPa6Ex3Yh",
"created_at": "2026-09-30T13:02:44Z",
"modified_at": "2026-10-08T07:51:19Z"
}
Download a file
GET/items/{id}/content
Returns the bytes of a file with its Content-Type. Send a Range header to download part of a file or to resume a download that stopped; the response is then 206 Partial Content.
Folders cannot be downloaded this way. To download a folder, list its items and download each file.
Needs the files.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
id | string Required | File ID. |
| Query | ||
revision | string | Revision ID, to download an earlier version. Defaults to the current one. See List revisions. |
| Headers | ||
Range | string | Byte range, like bytes=0-1048575. |
Example
curl https://syncxfiles.com/rest/2026-02/items/itm_8Vd2Kp6Wq4/content \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-H "Range: bytes=0-1048575" \
-o report-q3.part
url = f"{API}/items/itm_8Vd2Kp6Wq4/content"
with session.get(url, stream=True, timeout=60) as r:
r.raise_for_status()
with open("report-q3.pdf", "wb") as f:
for chunk in r.iter_content(chunk_size=1 << 20):
f.write(chunk)
import { writeFile } from "node:fs/promises";
const res = await fetch(`${API}/items/itm_8Vd2Kp6Wq4/content`, { headers });
if (!res.ok) throw new Error(`HTTP ${res.status}`);
await writeFile("report-q3.pdf", Buffer.from(await res.arrayBuffer()));
HTTP/1.1 206 Partial Content
Content-Type: application/pdf
Content-Length: 1048576
Content-Range: bytes 0-1048575/2482113
Accept-Ranges: bytes
ETag: "4-54ba90b1"
Rename or move an item
PATCH/items/{id}
Changes the name of an item, the folder it is in, or both. Send at least one of name and parent.
Put the ETag you last read in If-Match. If someone changed the item since then, you get 412 and nothing is changed: read the item again and decide what to do. If the target folder already has an item with the new name, you get 409.
Needs the files.write scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
id | string Required | Item ID. |
| Headers | ||
If-Match | string Required | The item's current ETag, in double quotes. |
| Body | ||
name | string | New name, up to 255 characters. |
parent | string | ID of the folder to move the item into, or root. |
Example
curl -X PATCH https://syncxfiles.com/rest/2026-02/items/itm_8Vd2Kp6Wq4 \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-H 'If-Match: "4-54ba90b1"' \
-H "Content-Type: application/json" \
-d '{"name": "report-q3-final.pdf", "parent": "itm_3mZr8TqA1c"}'
r = session.patch(
f"{API}/items/itm_8Vd2Kp6Wq4",
headers={"If-Match": '"4-54ba90b1"'},
json={"name": "report-q3-final.pdf", "parent": "itm_3mZr8TqA1c"},
timeout=30,
)
if r.status_code == 412:
print("Changed since you read it. Get the item again and retry.")
const res = await fetch(`${API}/items/itm_8Vd2Kp6Wq4`, {
method: "PATCH",
headers: {
...headers,
"If-Match": '"4-54ba90b1"',
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "report-q3-final.pdf", parent: "itm_3mZr8TqA1c" }),
});
{
"id": "itm_8Vd2Kp6Wq4",
"type": "file",
"name": "report-q3-final.pdf",
"parent_id": "itm_3mZr8TqA1c",
"drive_id": "drv_7Hq2Lx9VmK",
"size": 2482113,
"mime_type": "application/pdf",
"sha256": "54ba90b1d43ec38670997f1f3d23b5fd74d9a56fc981e206c814c3a4b1b2e6ee",
"etag": "5-54ba90b1",
"revision_id": "rev_9dPa6Ex3Yh",
"created_at": "2026-09-30T13:02:44Z",
"modified_at": "2026-10-09T08:12:07Z"
}
Move an item to the trash
DELETE/items/{id}
Moves a file or folder, with everything inside it, to the trash. Items stay in the trash for 30 days on Free, 180 days on Plus and one year on Team, and can be restored from the apps until then.
Send If-Match to make sure you delete the version you expect.
Needs the files.write scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
id | string Required | Item ID. |
| Headers | ||
If-Match | string | Only delete if the item still has this ETag. |
Example
curl -X DELETE https://syncxfiles.com/rest/2026-02/items/itm_8Vd2Kp6Wq4 \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-H 'If-Match: "5-54ba90b1"'
r = session.delete(
f"{API}/items/itm_8Vd2Kp6Wq4",
headers={"If-Match": '"5-54ba90b1"'},
timeout=30,
)
r.raise_for_status()
const res = await fetch(`${API}/items/itm_8Vd2Kp6Wq4`, {
method: "DELETE",
headers: { ...headers, "If-Match": '"5-54ba90b1"' },
});
if (res.status !== 204) throw new Error(`HTTP ${res.status}`);
HTTP/1.1 204 No Content
List revisions of a file
GET/items/{id}/revisions
Returns the earlier versions of a file, newest first, for as long as your plan keeps version history. source tells you where the change came from: desktop, mobile, web or api. To get the contents of a revision, pass its ID to Download a file.
Needs the files.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
id | string Required | File ID. |
| Query | ||
cursor | string | The next_cursor from the previous page. |
limit | integer | Revisions per page, 1-200. Default 50. |
Example
curl https://syncxfiles.com/rest/2026-02/items/itm_8Vd2Kp6Wq4/revisions \
-H "Authorization: Bearer $SYNCX_TOKEN"
r = session.get(f"{API}/items/itm_8Vd2Kp6Wq4/revisions", timeout=30)
for rev in r.json()["data"]:
print(rev["created_at"], rev["size"], rev["source"])
const res = await fetch(`${API}/items/itm_8Vd2Kp6Wq4/revisions`, { headers });
const { data: revisions } = await res.json();
{
"data": [
{
"id": "rev_9dPa6Ex3Yh",
"size": 2482113,
"sha256": "54ba90b1d43ec38670997f1f3d23b5fd74d9a56fc981e206c814c3a4b1b2e6ee",
"source": "desktop",
"created_at": "2026-10-08T07:51:19Z"
},
{
"id": "rev_2Lc5Hn8Ub6",
"size": 2479380,
"sha256": "464b95a81cb1603b0206fa5f846ae1aa74a693778ff1bb15e1612edeed889660",
"source": "web",
"created_at": "2026-10-03T15:06:47Z"
}
],
"next_cursor": null
}
Start an upload
POST/uploads
Files go up in three steps: start an upload, send its parts, then commit. Parts are 8 MiB, except the last one, and you can send them in any order and in parallel. If a part fails, send it again.
An upload expires 24 hours after it starts. The file appears in the drive only after the commit.
Needs the files.write scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Body | ||
name | string Required | File name, up to 255 characters. |
parent | string Required | Folder ID, or root. |
size | integer Required | File size in bytes. |
sha256 | string Required | SHA-256 of the whole file as 64 hex characters. Checked on commit. |
on_conflict | string | What to do if the folder already has an item with this name: fail (default), rename or new_revision. |
Example
curl https://syncxfiles.com/rest/2026-02/uploads \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "backup-2026-10-09.tar.gz",
"parent": "itm_5Wk9Rb3Lm7",
"size": 46137344,
"sha256": "3160e62f245abfea704796956dcbf517177f947fe7d917d38452176fbc16c39e"
}'
import hashlib
from pathlib import Path
path = Path("backup-2026-10-09.tar.gz")
upload = session.post(f"{API}/uploads", json={
"name": path.name,
"parent": "itm_5Wk9Rb3Lm7",
"size": path.stat().st_size,
"sha256": hashlib.sha256(path.read_bytes()).hexdigest(),
}, timeout=30).json()
import { createHash } from "node:crypto";
import { readFile } from "node:fs/promises";
const file = await readFile("backup-2026-10-09.tar.gz");
const res = await fetch(`${API}/uploads`, {
method: "POST",
headers: { ...headers, "Content-Type": "application/json" },
body: JSON.stringify({
name: "backup-2026-10-09.tar.gz",
parent: "itm_5Wk9Rb3Lm7",
size: file.length,
sha256: createHash("sha256").update(file).digest("hex"),
}),
});
const upload = await res.json();
{
"upload_id": "upl_Q4n7Wb2Ks0",
"part_size": 8388608,
"part_count": 6,
"expires_at": "2026-10-10T08:14:52Z"
}
Upload a part
PUT/uploads/{upload_id}/parts/{n}
Send part n as the raw request body. Every part except the last must be exactly part_size bytes. Sending the same part number again replaces it.
Needs the files.write scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
upload_id | string Required | The upload_id from Start an upload. |
n | integer Required | Part number, from 1 to part_count. |
| Headers | ||
Content-Type | string Required | application/octet-stream |
Content-Length | integer Required | Size of this part in bytes. |
Example
# Part 1 of 6: the first 8 MiB of the file
dd if=backup-2026-10-09.tar.gz bs=8388608 skip=0 count=1 2>/dev/null |
curl -X PUT https://syncxfiles.com/rest/2026-02/uploads/upl_Q4n7Wb2Ks0/parts/1 \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-H "Content-Type: application/octet-stream" \
--data-binary @-
# Continues from Start an upload
with path.open("rb") as f:
for n in range(1, upload["part_count"] + 1):
r = session.put(
f"{API}/uploads/{upload['upload_id']}/parts/{n}",
data=f.read(upload["part_size"]),
headers={"Content-Type": "application/octet-stream"},
timeout=120,
)
r.raise_for_status()
// Continues from Start an upload
const { upload_id, part_size, part_count } = upload;
for (let n = 1; n <= part_count; n++) {
const res = await fetch(`${API}/uploads/${upload_id}/parts/${n}`, {
method: "PUT",
headers: { ...headers, "Content-Type": "application/octet-stream" },
body: file.subarray((n - 1) * part_size, n * part_size),
});
if (!res.ok) throw new Error(`Part ${n}: HTTP ${res.status}`);
}
{
"part": 1,
"size": 8388608,
"received_at": "2026-10-09T08:15:03Z"
}
Commit an upload
POST/uploads/{upload_id}/commit
Checks that every part has arrived, compares the SHA-256 of the assembled file with the one you sent when you started, and creates the file. If a part is missing or the checksum does not match, you get 422; the upload stays open and you can send the affected parts again.
Needs the files.write scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Path | ||
upload_id | string Required | The upload_id from Start an upload. |
Example
curl -X POST https://syncxfiles.com/rest/2026-02/uploads/upl_Q4n7Wb2Ks0/commit \
-H "Authorization: Bearer $SYNCX_TOKEN"
r = session.post(f"{API}/uploads/{upload['upload_id']}/commit", timeout=60)
r.raise_for_status()
item = r.json()
print("Uploaded", item["id"], item["name"])
const res = await fetch(`${API}/uploads/${upload_id}/commit`, {
method: "POST",
headers,
});
const item = await res.json();
{
"id": "itm_6Jx4Tz9Pd3",
"type": "file",
"name": "backup-2026-10-09.tar.gz",
"parent_id": "itm_5Wk9Rb3Lm7",
"drive_id": "drv_7Hq2Lx9VmK",
"size": 46137344,
"mime_type": "application/gzip",
"sha256": "3160e62f245abfea704796956dcbf517177f947fe7d917d38452176fbc16c39e",
"etag": "1-3160e62f",
"revision_id": "rev_4Tb8Gm1Zc5",
"created_at": "2026-10-09T08:16:12Z",
"modified_at": "2026-10-09T08:16:12Z"
}
Follow changes
GET/changes
The change feed is how the Syncx apps keep folders in sync, and your code can use it the same way. Call it once with cursor=latest to get a starting point, then keep calling it with the cursor from the last response.
With wait, the request stays open until something changes or the time runs out, so you hear about changes within a second without polling. If has_more is true, call again right away.
Change types are item.created, item.updated, item.moved and item.deleted.
Needs the files.read scope.
Parameters
| Parameter | Type | Description |
|---|---|---|
| Query | ||
cursor | string Required | latest, or the cursor from the previous response. |
wait | integer | Seconds to wait for a change, 0-60. Default 0. |
limit | integer | Changes per response, 1-500. Default 100. |
drive | string | Only changes in this drive. Defaults to every drive the token can see. |
Example
curl -G https://syncxfiles.com/rest/2026-02/changes \
-H "Authorization: Bearer $SYNCX_TOKEN" \
-d cursor=ch_8Fq2Ny6Wd0 \
-d wait=30
cursor = session.get(
f"{API}/changes",
params={"cursor": "latest"},
timeout=30,
).json()["cursor"]
while True:
feed = session.get(
f"{API}/changes",
params={"cursor": cursor, "wait": 30},
timeout=45,
).json()
for change in feed["changes"]:
print(change["type"], change["item"]["name"])
cursor = feed["cursor"]
let res = await fetch(`${API}/changes?cursor=latest`, { headers });
let { cursor } = await res.json();
while (true) {
res = await fetch(`${API}/changes?cursor=${cursor}&wait=30`, { headers });
const feed = await res.json();
for (const change of feed.changes) {
console.log(change.type, change.item.name);
}
cursor = feed.cursor;
}
{
"changes": [
{
"type": "item.created",
"at": "2026-10-09T08:16:12Z",
"item": {
"id": "itm_6Jx4Tz9Pd3",
"type": "file",
"name": "backup-2026-10-09.tar.gz",
"parent_id": "itm_5Wk9Rb3Lm7",
"etag": "1-3160e62f"
}
},
{
"type": "item.deleted",
"at": "2026-10-09T08:17:40Z",
"item": {
"id": "itm_1Qe7Vg2Ma8",
"type": "file",
"name": "backup-2026-10-02.tar.gz",
"parent_id": "itm_5Wk9Rb3Lm7"
}
}
],
"cursor": "ch_8Fq2Ny6Wd0",
"has_more": false
}