List files
Every attachment the mailbox holds, sent and received.
Runs the real call against your workspace, with your own key.
GET /files
Every attachment the mailbox holds, sent and received.
Example
Needs threads:read, because a file is part of the mail it came on. q searches the name and the type, kind keeps image, pdf, audio, video or text, and sort is newest, oldest, largest or name.
curl "$OE/files?kind=pdf&sort=largest" -H "$AUTH"{ "object": "list", "data": [{ "object": "file", "id": "file_6bb640f5b99e47deb758f1f5", "filename": "invoice-0912.pdf", "mimeType": "application/pdf", "sizeBytes": 184233, "direction": "inbound", "threadId": "thread_2f9b…", "messageId": "<CAF7x…@mail.gmail.com>", "deliveredTo": "[email protected]", "createdAt": "2026-09-12T08:41:03.000Z" }], "hasMore": false, "nextCursor": null}A key limited to particular addresses or domains sees only the files that arrived at them, the same boundary the thread list uses. A deleted file is not listed.
The index starts from the day it shipped. Older attachments are still on their messages, where GET /threads/{id}/messages/{messageId}/attachments reads them.
A cursor carries on in the order it was handed out in, and one handed out under another sort is a 400 invalid_cursor.