API reference / ZiloDrive
ZiloDrive
Files and folders, uploads and downloads.
List files and folders#
A folder's contents (My Drive when no folder), or with q a search of everything the person can open (theirs and shared with them). Folders first, then by name.
Query
folderstringqstringtrashedbooleanlimitintegercursorstringnext value from the previous page. Up to 500 characters.Answer · 200 OK
dataarray of objectidstringnamestringkindenum | stringfile, folder, doc, sheet, slide, pdf, form.mimeTypestring | nullsizeBytesintegerfolderIdstring | nullstarredbooleanvirusScanstring | nullownerstring | nullcreatedAtstringupdatedAtstringtrashedAtstring | nullnextstring | nullcursor for the next page; null on the last.curl "https://api.zilomail.in/v1/drive/items?limit=20" \
-H "Authorization: Bearer $ZILO_TOKEN"{
"data": [
{
"id": "string",
"name": "string",
"kind": "file",
"mimeType": "string",
"sizeBytes": 0,
"folderId": "string",
"starred": false,
"virusScan": "string",
"owner": "string",
"createdAt": "2026-10-17T09:30:00.000Z",
"updatedAt": "2026-10-17T09:30:00.000Z",
"trashedAt": "2026-10-17T09:30:00.000Z"
}
],
"next": "string"
}Try it
Sign in to call it as yourself.
Get a file or folder#
Path
idstringrequiredAnswer · 200 OK
idstringnamestringkindenum | stringfile, folder, doc, sheet, slide, pdf, form.mimeTypestring | nullsizeBytesintegerfolderIdstring | nullstarredbooleanvirusScanstring | nullownerstring | nullcreatedAtstringupdatedAtstringtrashedAtstring | nullcurl "https://api.zilomail.in/v1/drive/items/ID" \
-H "Authorization: Bearer $ZILO_TOKEN"{
"id": "string",
"name": "string",
"kind": "file",
"mimeType": "string",
"sizeBytes": 0,
"folderId": "string",
"starred": false,
"virusScan": "string",
"owner": "string",
"createdAt": "2026-10-17T09:30:00.000Z",
"updatedAt": "2026-10-17T09:30:00.000Z",
"trashedAt": "2026-10-17T09:30:00.000Z"
}Try it
Sign in to call it as yourself.
Download a file#
The file's bytes (Range requests work). Documents, spreadsheets and presentations are exported from their own apps.
Path
idstringrequiredcurl "https://api.zilomail.in/v1/drive/items/ID/content" \
-H "Authorization: Bearer $ZILO_TOKEN"Try it
Sign in to call it as yourself.
Upload a file#
Send the file's bytes as the body (any Content-Type), its name in name. Virus-scanned like every upload (a virus is refused with 422). Up to 100 MB here, within the organisation's own limits and the person's storage.
Query
namestringrequiredfolderstringBody
The file's bytes, with its Content-Type.
Answer · 201 Created
idstringnamestringkindenum | stringfile, folder, doc, sheet, slide, pdf, form.mimeTypestring | nullsizeBytesintegerfolderIdstring | nullstarredbooleanvirusScanstring | nullownerstring | nullcreatedAtstringupdatedAtstringtrashedAtstring | nullcurl -X POST "https://api.zilomail.in/v1/drive/files?name=report.pdf" \
-H "Authorization: Bearer $ZILO_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
--data-binary @report.pdf{
"id": "string",
"name": "string",
"kind": "file",
"mimeType": "string",
"sizeBytes": 0,
"folderId": "string",
"starred": false,
"virusScan": "string",
"owner": "string",
"createdAt": "2026-10-17T09:30:00.000Z",
"updatedAt": "2026-10-17T09:30:00.000Z",
"trashedAt": "2026-10-17T09:30:00.000Z"
}Try it
Sign in to call it as yourself.
Make a folder#
Body
namestringrequiredfolderstringAnswer · 201 Created
idstringnamestringkindenum | stringfile, folder, doc, sheet, slide, pdf, form.mimeTypestring | nullsizeBytesintegerfolderIdstring | nullstarredbooleanvirusScanstring | nullownerstring | nullcreatedAtstringupdatedAtstringtrashedAtstring | nullcurl -X POST "https://api.zilomail.in/v1/drive/folders" \
-H "Authorization: Bearer $ZILO_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'{
"id": "string",
"name": "string",
"kind": "file",
"mimeType": "string",
"sizeBytes": 0,
"folderId": "string",
"starred": false,
"virusScan": "string",
"owner": "string",
"createdAt": "2026-10-17T09:30:00.000Z",
"updatedAt": "2026-10-17T09:30:00.000Z",
"trashedAt": "2026-10-17T09:30:00.000Z"
}Try it
Sign in to call it as yourself.
Rename, move or star#
folder: a folder id, or "root" for My Drive (the owner only). A name already used there gets a number added.
Path
idstringrequiredBody
namestringfolderstringstarredbooleanAnswer · 200 OK
idstringnamestringkindenum | stringfile, folder, doc, sheet, slide, pdf, form.mimeTypestring | nullsizeBytesintegerfolderIdstring | nullstarredbooleanvirusScanstring | nullownerstring | nullcreatedAtstringupdatedAtstringtrashedAtstring | nullcurl -X PATCH "https://api.zilomail.in/v1/drive/items/ID" \
-H "Authorization: Bearer $ZILO_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'{
"id": "string",
"name": "string",
"kind": "file",
"mimeType": "string",
"sizeBytes": 0,
"folderId": "string",
"starred": false,
"virusScan": "string",
"owner": "string",
"createdAt": "2026-10-17T09:30:00.000Z",
"updatedAt": "2026-10-17T09:30:00.000Z",
"trashedAt": "2026-10-17T09:30:00.000Z"
}Try it
Sign in to call it as yourself.
Move to Trash#
With everything inside it (owner only). It stays in Trash for the organisation's retention time.
Path
idstringrequiredcurl -X DELETE "https://api.zilomail.in/v1/drive/items/ID" \
-H "Authorization: Bearer $ZILO_TOKEN"Answers 204 with no body.
Try it
Sign in to call it as yourself.