Developers
Build on Trilli.
A clean REST API for files, folders, and your account — Bearer-token auth, the same plan limits as the app, and a downloadable OpenAPI spec to generate clients in any language.
Getting started
The API is available on plans that include API access (Plus and Infinity). Create a key in the app under Settings → API access, then call the endpoints below.
Base URL
https://app.trilli.com/api/v1Authentication
Send your key as a Bearer token on every request. Keys carry full access to the account and obey the same plan limits as the app.
Authorization: Bearer trilli_sk_…
Account
Account and plan information.
/accountGet account infoAccount id, plan name, storage usage, and the plan's storage / max-file-size limits.
Request
curl https://app.trilli.com/api/v1/account \ -H "Authorization: Bearer trilli_sk_…"
Response
{
"account_id": 767327631254,
"plan": "Plus",
"storage_bytes_used": 55734275,
"max_storage_bytes": 7696581394432,
"max_file_size_bytes": 26843545600
}Files
Upload, download, list, and remove files. Uploads obey your plan's max file size and storage quota; transfer is metered both ways.
/filesList filesFiles directly inside a folder. Omit folder_id for the account root.
| Param | In | Type | Description |
|---|---|---|---|
folder_id | query | integer | Folder to list. Omit for root. |
Request
curl "https://app.trilli.com/api/v1/files?folder_id=1" \ -H "Authorization: Bearer trilli_sk_…"
Response
{
"files": [
{
"id": 119,
"name": "report.pdf",
"size_bytes": 459588,
"content_type": "application/pdf",
"parent_folder_id": 1,
"created_at": "2026-06-06T18:02:10Z"
}
]
}/filesUpload a filemultipart/form-data. Returns the created file. 413 if it exceeds the plan's max file size; 507 if over storage/transfer.
| Param | In | Type | Description |
|---|---|---|---|
filerequired | form | binary | The file contents. |
folder_id | form | integer | Destination folder. Omit for root. |
Request
curl -X POST https://app.trilli.com/api/v1/files \ -H "Authorization: Bearer trilli_sk_…" \ -F "[email protected]" \ -F "folder_id=1"
Response
{
"id": 120,
"name": "report.pdf",
"size_bytes": 459588,
"content_type": "application/pdf",
"parent_folder_id": 1,
"status": "active"
}/files/{id}Get file metadata| Param | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | File id. |
Request
curl https://app.trilli.com/api/v1/files/119 \ -H "Authorization: Bearer trilli_sk_…"
Response
{
"id": 119,
"name": "report.pdf",
"size_bytes": 459588,
"content_type": "application/pdf",
"parent_folder_id": 1
}/files/{id}/contentDownload file contentsStreams the raw bytes. Egress is metered against your monthly transfer allowance.
| Param | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | File id. |
Request
curl https://app.trilli.com/api/v1/files/119/content \ -H "Authorization: Bearer trilli_sk_…" \ -o report.pdf
Response
# binary file contents (application/octet-stream)
/files/{id}Move a file to trash| Param | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | File id. |
Request
curl -X DELETE https://app.trilli.com/api/v1/files/119 \ -H "Authorization: Bearer trilli_sk_…"
Response
# 204 No Content
Folders
List and create folders.
/foldersList foldersSubfolders of a folder. Omit parent_id for top-level folders.
| Param | In | Type | Description |
|---|---|---|---|
parent_id | query | integer | Parent folder. Omit for top-level. |
Request
curl "https://app.trilli.com/api/v1/folders" \ -H "Authorization: Bearer trilli_sk_…"
Response
{
"folders": [
{ "id": 1, "name": "Documents", "parent_folder_id": null }
]
}/foldersCreate a folderJSON body. 409 if a folder with that name already exists in the same place.
| Param | In | Type | Description |
|---|---|---|---|
namerequired | body | string | Folder name. |
parent_id | body | integer | Parent folder. Omit for root. |
Request
curl -X POST https://app.trilli.com/api/v1/folders \
-H "Authorization: Bearer trilli_sk_…" \
-H "Content-Type: application/json" \
-d '{"name":"Reports","parent_id":1}'Response
{
"id": 42,
"name": "Reports",
"parent_folder_id": 1,
"status": "active"
}Errors
Errors return a JSON body of the form {"error":"…"} with the status below.
400 | Bad request — a required field is missing or invalid. |
401 | Missing or invalid API key. |
403 | API access is not included in this account's plan. |
404 | The file or folder doesn't exist. |
409 | A folder with that name already exists here. |
413 | Upload exceeds the plan's max file size. |
507 | Storage quota or monthly transfer limit reached. |
Ready to build?
Create a key in seconds, or import the OpenAPI spec into Postman, Insomnia, or your client generator of choice.