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/v1

Authentication

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.

GET/accountGet account info

Account 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.

GET/filesList files

Files directly inside a folder. Omit folder_id for the account root.

ParamInTypeDescription
folder_idqueryintegerFolder 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"
    }
  ]
}
POST/filesUpload a file

multipart/form-data. Returns the created file. 413 if it exceeds the plan's max file size; 507 if over storage/transfer.

ParamInTypeDescription
filerequiredformbinaryThe file contents.
folder_idformintegerDestination 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"
}
GET/files/{id}Get file metadata
ParamInTypeDescription
idrequiredpathintegerFile 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
}
GET/files/{id}/contentDownload file contents

Streams the raw bytes. Egress is metered against your monthly transfer allowance.

ParamInTypeDescription
idrequiredpathintegerFile 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)
DELETE/files/{id}Move a file to trash
ParamInTypeDescription
idrequiredpathintegerFile 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.

GET/foldersList folders

Subfolders of a folder. Omit parent_id for top-level folders.

ParamInTypeDescription
parent_idqueryintegerParent 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 }
  ]
}
POST/foldersCreate a folder

JSON body. 409 if a folder with that name already exists in the same place.

ParamInTypeDescription
namerequiredbodystringFolder name.
parent_idbodyintegerParent 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.

400Bad request — a required field is missing or invalid.
401Missing or invalid API key.
403API access is not included in this account's plan.
404The file or folder doesn't exist.
409A folder with that name already exists here.
413Upload exceeds the plan's max file size.
507Storage 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.