Drive
List your shares
GET /api/v1/drive/shares
Who can use this: Any signed-in account As Markdown
Two lists in one answer. shared_by_me is every share you made and haven't revoked, with who it is for (null means anyone with the link) and how often it has been opened. shared_with_me is what others have shared with your address and still works. Shares of things in Trash are left out of both.
Good to know
Your own list still shows shares whose time has run out; check expires_at.
cURL
Perl
homelab-cli
Copy
curl -s 'https://api.mailmasker.org/api/v1/drive/shares' \
-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/shares',
{ Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
There's no homelab-cli command for this yet.
Response 200 OK
Copy
{
"shared_by_me": [
{
"id": 16,
"token": "0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e",
"shared_with_email": null,
"created_at": "2026-11-03 21:42:10.123456-06",
"expires_at": "2026-11-10 21:42:10.123456-06",
"access_count": 4,
"accessed_at": "2026-11-03 22:05:31.402215-06",
"label": "Photos",
"target": "folder",
"url": "https://drive.example.com/s/0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e0ddba11e"
},
{
"id": 15,
"token": "5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e",
"shared_with_email": "friend@example.com",
"created_at": "2026-11-03 21:40:02.918377-06",
"expires_at": null,
"access_count": 0,
"accessed_at": null,
"label": "notes.txt",
"target": "file",
"url": "https://drive.example.com/s/5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e5ca1ab1e"
}
],
"shared_with_me": [
{
"id": 11,
"token": "c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00",
"owner_email": "friend@example.com",
"created_at": "2026-11-01 14:03:55.120934-06",
"expires_at": null,
"label": "Recipes",
"target": "folder",
"url": "https://drive.example.com/s/c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00c0ffee00"
}
]
}