Sign in

API reference / ZiloDrive

ZiloDrive

Files and folders, uploads and downloads.

Base URL https://api.zilomail.in

List files and folders#

GET/v1/drive/items
drive.read

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

folderstring
Up to 64 characters.
qstring
Up to 200 characters.
trashedboolean
List their Trash instead.
limitinteger
How many to return (1–200). Default 50.
cursorstring
The next value from the previous page. Up to 500 characters.

Answer · 200 OK

dataarray of object
idstring
namestring
kindenum | string
One of file, folder, doc, sheet, slide, pdf, form.
mimeTypestring | null
sizeBytesinteger
folderIdstring | null
The folder it's in; null: My Drive.
starredboolean
virusScanstring | null
ZiloSecur: "clean", "pending", "skipped" or "unavailable" (files only).
ownerstring | null
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
updatedAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
trashedAtstring | null
nextstring | null
Pass as cursor for the next page; null on the last.
curl "https://api.zilomail.in/v1/drive/items?limit=20" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "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#

GET/v1/drive/items/{id}
drive.readETag · If-Match

Path

idstringrequired
An id this API gave out. Up to 64 characters.

Answer · 200 OK

idstring
namestring
kindenum | string
One of file, folder, doc, sheet, slide, pdf, form.
mimeTypestring | null
sizeBytesinteger
folderIdstring | null
The folder it's in; null: My Drive.
starredboolean
virusScanstring | null
ZiloSecur: "clean", "pending", "skipped" or "unavailable" (files only).
ownerstring | null
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
updatedAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
trashedAtstring | null
curl "https://api.zilomail.in/v1/drive/items/ID" \
  -H "Authorization: Bearer $ZILO_TOKEN"
Answer · 200 OK
{
  "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#

GET/v1/drive/items/{id}/content
drive.readanswers a file

The file's bytes (Range requests work). Documents, spreadsheets and presentations are exported from their own apps.

Path

idstringrequired
An id this API gave out. Up to 64 characters.
curl "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#

POST/v1/drive/files
drive.writeIdempotency-Key

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

namestringrequired
Up to 255 characters.
folderstring
Up to 64 characters.

Body

The file's bytes, with its Content-Type.

Answer · 201 Created

idstring
namestring
kindenum | string
One of file, folder, doc, sheet, slide, pdf, form.
mimeTypestring | null
sizeBytesinteger
folderIdstring | null
The folder it's in; null: My Drive.
starredboolean
virusScanstring | null
ZiloSecur: "clean", "pending", "skipped" or "unavailable" (files only).
ownerstring | null
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
updatedAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
trashedAtstring | null
curl -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
Answer · 201 Created
{
  "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#

POST/v1/drive/folders
drive.writeIdempotency-Key

Body

namestringrequired
Up to 255 characters.
folderstring
Inside this folder; default My Drive. Up to 64 characters.

Answer · 201 Created

idstring
namestring
kindenum | string
One of file, folder, doc, sheet, slide, pdf, form.
mimeTypestring | null
sizeBytesinteger
folderIdstring | null
The folder it's in; null: My Drive.
starredboolean
virusScanstring | null
ZiloSecur: "clean", "pending", "skipped" or "unavailable" (files only).
ownerstring | null
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
updatedAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
trashedAtstring | null
curl -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"
}'
Answer · 201 Created
{
  "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#

PATCH/v1/drive/items/{id}
drive.writeETag · If-Match

folder: a folder id, or "root" for My Drive (the owner only). A name already used there gets a number added.

Path

idstringrequired
An id this API gave out. Up to 64 characters.

Body

namestring
Up to 255 characters.
folderstring
Up to 64 characters.
starredboolean

Answer · 200 OK

idstring
namestring
kindenum | string
One of file, folder, doc, sheet, slide, pdf, form.
mimeTypestring | null
sizeBytesinteger
folderIdstring | null
The folder it's in; null: My Drive.
starredboolean
virusScanstring | null
ZiloSecur: "clean", "pending", "skipped" or "unavailable" (files only).
ownerstring | null
createdAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
updatedAtstring
ISO 8601 date and time, UTC, e.g. 2026-10-17T09:30:00.000Z.
trashedAtstring | null
curl -X PATCH "https://api.zilomail.in/v1/drive/items/ID" \
  -H "Authorization: Bearer $ZILO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
Answer · 200 OK
{
  "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#

DELETE/v1/drive/items/{id}
drive.write

With everything inside it (owner only). It stays in Trash for the organisation's retention time.

Path

idstringrequired
An id this API gave out. Up to 64 characters.
curl -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.