Drive
List what's in Trash
GET /api/v1/drive/trash
Who can use this: Any signed-in account As Markdown
Newest first. Things you delete wait in Trash until you restore them, delete them for good, or empty Trash; after a while (30 days unless the server says otherwise) Drive empties them itself.
cURL
Perl
homelab-cli
Copy
curl -s 'https://api.mailmasker.org/api/v1/drive/trash' \
-H "Authorization: Bearer $TOKEN"
use Mojo::Base -strict;
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/drive/trash',
{ Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
homelab-cli drive trash
Response 200 OK
Copy
{
"files": [
{ "id": 42, "filename": "old-notes.txt", "size_bytes": 1532, "mime_type": "text/plain", "deleted_at_display": "2026-11-03 21:42:10 CST" }
],
"folders": [
{ "id": 7, "name": "Old photos", "deleted_at_display": "2026-11-02 09:15:00 CST" }
]
}