# List your invites

`GET https://api.mailmasker.org/api/v1/invites`

Every invite you have sent, newest first, and what became of each.

- Who can use it: Any signed-in account
- Area: Invites
- Answers 200 OK when it works
- Page: https://developer.mailmasker.org/invite-list

`status` is pending, accepted (the link was used), revoked (it was withdrawn) or expired. For an accepted invite, `accepted_user_email` is the account it made.

## Parameters

| Name | In | Required | What it is | Example |
|---|---|---|---|---|
| `all` | query | no | true or 1 for everyone's invites, not only yours. Site admins only; anyone else gets 403. |  |

## Good to know

- An invite past its `expires_at` says expired, and no longer counts toward your limit of waiting invites.

## Examples

cURL:

```bash
curl -s 'https://api.mailmasker.org/api/v1/invites' \
  -H "Authorization: Bearer $TOKEN"
```

Perl:

```perl
use Mojo::Base -strict;
use Mojo::UserAgent;

my $ua  = Mojo::UserAgent->new;
my $res = $ua->get('https://api.mailmasker.org/api/v1/invites',
    { Authorization => "Bearer $ENV{TOKEN}" })->result;
die $res->code, ' ', ($res->json('/error') // $res->message), "\n" unless $res->is_success;
print $res->body, "\n";
```

homelab-cli:

```bash
homelab-cli invite list
```

## Response

200 OK:

```json
[
  {
    "id": 12,
    "token": "f00dfeedf00dfeedf00dfeedf00dfeedf00dfeedf00dfeedf00dfeedf00dfeed",
    "sender_email": "you@example.com",
    "recipient_email": "friend@example.com",
    "channel": "cli",
    "message": "Come and join me here.",
    "status": "pending",
    "created_at": "2026-11-03 21:42:10.123456-06",
    "expires_at": "2026-11-17 21:42:10.123456-06",
    "accepted_at": null,
    "accepted_user_email": null,
    "revoked_at": null,
    "revoked_by_email": null
  }
]
```
